Woocommerce product category title & description

Hi there

I use X Pro. Since your custom header does not yet support page titles on different Woocommerce product category pages, I think I made a way to make this possible…

I set product category title and description. It is now shown very small:

I would like the title to be shown as h2. And the text as my normal alinea text size.

How can I make this possible?

Thanks in advance!!

Hello @Woordenaar,

Thanks for asking. :slight_smile:

Can you please confirm again as this is what I see upon visiting Dac product category page. I don’t see the text as shown in the screenshot. https://screencast.com/t/Sh0syCpb8S

Thanks.

Hi there

I updated the secure note and sent you a link to the category DAC. Normally the text should be visible. I would like to change not only that category page text but all categories so upon navigating the main menu my visitors will have the H1 title of the category and a short description formatted as alinea font size…

Thanks in advance! :slight_smile:

Hi there,

Thanks, how did you add those text? You need to wrap those information with <h1> and <h2>. Example,

`

DAC’s

High-end digitaal-naar-analoog converters

`

instead of this

`

DAC’s

High-end digitaal-naar-analoog converters

`

I checked our templates and there is no term-description, I’m not sure how you added it (static or shortcode). You may provide further information and maybe I could provide a small snippet.

Thanks!

Hi there

I edited the product category and added the title and text under “description” for each product category. I tried to write this in the description field

<h1>DAC's</h1>

But it does not get displayed…

Here you can see it:

No matter what code I put in this field, it keeps changing to regular text…

There must be a way to add html / css code in that field, right?!

This would be the easiest way for me to have a title on every product-category page of my woocommerce shop. Since your header still does not support standard page titles that would be much easier than to make a seperate header for every product category, right?

1 Like

Hi there,

Ah, I know what you mean :slight_smile:

Please implement this code in your child theme’s functions.php to allow HTML content.

foreach ( array( 'pre_term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_filter_kses' );
}
 
foreach ( array( 'term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_kses_data' );
}

Reference: https://docs.woocommerce.com/document/allow-html-in-term-category-tag-descriptions/

Hope this helps.

1 Like

Hey there!

That was exactly what I needed. Works perfectly!!! Thank you very much !!! :slight_smile:

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.