• Hi,

    I have a shop page that only displays the categories and no products. I’d like the description of each category to also show under the category image & title on this shop page (not the individual category pages).
    Have tried code that I’ve found online, but no luck unfortunately.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support mouli a11n

    (@mouli)

    Hi there,
    This will require a bit of code added to your themes functions.php file.
    Maybe if you could share the code that you have tried already we might be able to figure out why it isn’t working.

    There is a code snippet that I found that should do the trick here;
    https://gist.github.com/om4james/9883140

    Let us know how you get on and feel free to get back to us if you have further questions.

    Alternatively, there may be a plugin that does the job.
    I searched for WooCommerce show category descriptions and found this one that shows the categories in a slider:
    https://www.ads-software.com/plugins/wc-category-showcase/

    Let us know how you get on and feel free to get back to us if you have further questions.

    Thread Starter MagineM

    (@maginem)

    Hi,

    Thanks for the feedback.

    The github link I have had a look at, but that code is for showing the descriptions of the products and not the categories. I tried to see if one can adapt for categories but with no luck…

    The plugin I’ve also had a look at, but this is assuming you’re using it on a custom built page. Ideally we want to be able to make the categories listed on the default shop page show their descriptions.

    Plugin Support mouli a11n

    (@mouli)

    Hi,
    You are perfectly correct and I apologize for not checking it further before suggesting it ??

    There appear to be numerous articles about achieving this so I suggest that you try a few out until you find one that fits your needs.

    I found this article to be a pretty good description of the mechanism behind displaying categories and it includes a suggestion for displaying category descriptions, so it may be a good starting point for you as well.

    This post may also be useful:
    https://www.ads-software.com/support/topic/including-category-description-in-theme/

    I hope that helps you to figure it out.
    Feel free to get back to us if you have further questions.

    Thread Starter MagineM

    (@maginem)

    Hi,

    Thanks. I have searched all over to try and find a solution, but no luck. That is why I’ve tried asking here.

    Unfortunately the link you shared I have also had a look at and have not been able to adapt it for what I need it for. The code is really to show the description on the category/archive page. This isn’t an issue and works (but I don’t need it).

    As mentioned, I need the description to show on the shop page that lists all categories.

    The other workaround is to create a custom shop page and manually add descriptions in etc. and then create a permanent redirect from the default shop page to the new one, but it’s not ideal as changes or new categories would always have to be manually added to this page.

    I was really hoping that there’d just be a hook into the template that would let me print the description together with the title & image…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Category description for categories on shop page’ is closed to new replies.