Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Display Woocommerce Product Category Description on Shop template

  • Hi GP,

    I would like the Product Category Description field to appear on my Product Category pages in what I believe is the default position above the products.

    I found a couple of existing threads for this.
    The gist seems to be the field is set to not display by default?
    I tried the suggestion which worked for others but didn’t for me.
    Perhaps because they were both based on the Merch template. Where I have used the Shop template?
    The code referred to below was not in my Additional CSS.

    In “Customize > Layout > WooCommerce”, enable the “Page title” option.

    Then in “Customize > Additional CSS”, find this CSS and remove it:

    `.tax-product_cat .woocommerce-products-header {
    display: none;
    }

    Thankyou – Steve

    PS – btw – the GP email advices for topic creation and your replies have stopped again.
    I have already responded to the original topic I created for this “Please change my forum account email address” which Stacey had resolved. The problem started when I changed my email address some time back. I have not made any further changes this time though.

  • I can add that when in Customize > Layout > WooCommerce > Shop (the heading)
    I tick “Display Page Title”.
    On the Shop page I now see “Shop” (which I don’t want to see because the word is in the header).
    But on the Product Category pages I do not see the Product Category Name (which is ok because I also don’t want to see it because it appears in the header).
    But I never see the Product Category Description appearing on the Product Category pages.

    And I can’t see any references made in my unedited CSS from the Shop GP template.

    `/* GeneratePress Site CSS */ /* adds a white border around the entire site on tablet and desktop */

    @media (min-width: 769px) {
    body {
    padding: 30px;
    }

    .site-footer {
    margin-top: 30px;
    }
    }

    /* image block drop shadow */

    .photo-shadow img {
    box-shadow: 10px 10px 0px rgba(237,235,235,0.8);
    }

    /* product additional information tabs font styling */

    .woocommerce table.shop_attributes th {
    font-size: 16px;
    }

    .woocommerce table.shop_attributes td p {
    padding: 8px 16px;
    font-size: 16px;
    } /* End GeneratePress Site CSS */

    /* Blog List Numbered Format; TO BE IMPROVED */
    ol {
    list-style: none !important;
    counter-reset: item;
    margin-left: 0 !important;
    }

    ol li {
    counter-increment: item;
    margin-bottom: 5px;
    position: relative;
    margin-left: 40px;
    }

    ol li:before {
    margin-right: 10px;
    content: counter(item);
    border-radius: 50%;
    border-top-color: rgb(212, 212, 212);
    border-top-style: solid;
    border-top-width: 1px;
    border-right-color: rgb(212, 212, 212);
    border-right-style: solid;
    border-right-width: 1px;
    border-bottom-color: rgb(212, 212, 212);
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-left-color: rgb(212, 212, 212);
    border-left-style: solid;
    border-left-width: 1px;
    border-image-outset: 0;
    border-image-repeat: stretch;
    border-image-slice: 100%;
    border-image-source: none;
    border-image-width: 1;
    color: #bbb;
    width: 1.2em;
    line-height: 1.2em;
    padding: 2px;
    text-align: center;
    position: absolute;
    left: -40px;
    }

  • Hi there,

    Would it be acceptable to add the category description below the category title in the Page Hero section? This way, we can manage it more easily using the existing Page Hero element.

    Let me know if this approach works for you.

  • Thankyou for getting back to me Alvin.
    And yes I always prefer to do something the easy/clean way where possible.

    Does that mean the Product Category Description would appear under the background image?
    As a paragraph of text on a white background before the categories products?
    I so then yes I am happy with that.

    I am not sure now which Hero Element the Product Category pages are using? I had assumed it was the Shop Page Hero. But this is not Dynamic? How then does the Product Category Name change over the background image?

    I was not initially to fussed about Product Category pages.
    However working on improving the site SEO convinced me of the need to better utilise them.
    I prefer to have a consistent look across all pages where possible.
    As I try to picture now how these Product Category pages might look.

  • It will look something like this:
    https://cln.sh/K3FMGwr7

  • Apologies for being difficult…after I saying I prefer a less complex solution.

    If it was a small amount of text like your example, or like the Blog Hero from the GP Shop template, or the Date on the Single Posts Hero, that would be consistent and would be fine.
    But the amount of text I will have for each Product Category is 1 or 2 or maybe more paragraphs.
    And ideally I would like to be able to format at least 1 heading.
    It feels like it should be paragraph text on a white background.

    I’ve seen it mentioned in other topics here that the Product Category Description does appear on the basic WordPress theme which I have now checked for myself and shown the example linked below.
    (I would not need to have the Product Category Name field, as that is already appearing in the Hero)
    I just mocked that up in my separate GP Shop website install and it is what I would like to achieve.

    I have looked further through the GP Topics and there seems to have been a number of solutions provided for displaying the Product Category Description on the Product Category page.
    However my skills/knowledge don’t seem to be sufficient (along with the images no longer being available) to understand which position they are discussing, and then how and where to add the code.
    Perhaps I’ll have more luck with a clearer mind tomorrow.

  • Hi there,

    the Shop site uses a GP Block Element titled Global Page Hero that can be found in Appearance > Elements
    This adds the hero section with the bg image and title.

    If you edit that, and exclude the Product Category Archvies from the element Display Rules it will remove the hero.

    Then go to Customiser > LAYOUT > Woocommerce and check the Display page title

    Then on your category archives you should see the archive title and its description.

  • Thankyou very much David. I’d got the impression I could do that. But just couldn’t put all the pieces together from the other topic posts.

    With your information I was able to join my remaining dots. And because I like the hero I included the Product Category Archives on the Shop Hero Element and now they both look consistent (to me).

    If I could please ask a further curiosity question.
    I see the Shop page actually has a Page called Shop that can be further formatted.
    However the Product Category Page does not have a specific Page in the same way?
    Which I am happy with…but just wanted to confirm my understanding from what I see.

  • Thats correct.
    Thinks of Product Categories as Post Category archive pages, there is no static page for them.
    The Shop page can be edited but there are some caveats. See points 1 and 2 in my reply here:

    https://generate.support/topic/woocommerce-layout-sidebar/#post-131171

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.