Skip Navigation

[Resolved] Woocommerce Archive Title is still showing on page

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to hide title on WooCommerce category or taxonomy archive.

Solution:
The simplest and easy way to hide the page title for your category archive is using CSS.

Please try to add following CSS to your theme's style.css file at bottom of the page and try to resolve your issue.

.archive.tax-product_cat .page-title {display:none!important;}

Relevant Documentation:

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by dmitryK-2 6 years, 3 months ago.

Assisted by: Minesh.

Author
Posts
#604896

Hi there, my question partly comes from thread https://toolset.com/forums/topic/remove-archive-from-wpv-archive-title/ but about Woocommerce product categories titles. Can you please help to hide WC Categories titles on Product Archive pages (no problem with Shop page !)

Link to a page where the issue can be seen:
hidden link

I expected to see: hide that page Product Categories Title ('Банное')

#604942

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - the simplest and easy way to hide the page title for your category archive is using CSS.

Please try to add following CSS to your theme's style.css file at bottom of the page and try to resolve your issue.

body.tax-product_cat  h1.page-title {
display: none !important;
}
#604975
Screen Shot 2018-01-10 at 11.33.52.png

Hello Minesh!
Well the css provided works only when I insert code in theme's style.css (please see attached). When I save & refresh page it still shows the Title. I think the reason is that core WordPress or Woocommerce code is used behind the css. I've tried but can't adopt the code provided in thread I've mentioned in first post, are there any other variants?

add_filter( 'get_the_archive_title', 'paulg_5_get_the_archive_title' );
 
function paulg_5_get_the_archive_title( $title ) {
    $prefixes_to_remove = array(
        'Year: ',
        'Archive: ',
        'Category: '
        // Add other prefixes you want to remove...
    );
 
    foreach( $prefixes_to_remove as $prefix ) {
        // If title starts with $prefix, remove it and finish
        if( $prefix == substr( $title, 0, strlen( $prefix ) ) )  {
            return substr( $title, strlen( $prefix ) );
        }
    }
 
    // No prefix was matched
    return $title;
}
#605003

This one works:

/*hide Title on WC ARCHIVES CATEGORIES*/
			.archive.tax-product_cat .page-title {display:none!important;}
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.