1
votes

Maybe this is too easy for you but to me...I can't do it! Guys, I need to hide the title in 2 of my product categories pages in Woocommerce. product-category/cat1 (category id 145) & product-category/cat2 (category id 146)

I tried to achieve that using CSS:

.catid-145 .entry-title  {
visibility: hidden;
}

or

.category-145 .entry-title  {
visibility: hidden;
}

I know this title is controlled by:

<h1 class="entry-title">Title here</h1>

I need to remove the title text and preserve the space, that's why I'm using "hidden". Any idea will be highly appreciated. Thank you.

3

3 Answers

1
votes

Please try this :

.catid-145 h1.entry-title {
    display: none;
}
0
votes

Adding the following code will remove the page title from Product Category Page :

if(is_product_category())
{
    add_filter( 'woocommerce_show_page_title', '__return_false' );  
}

Please add the code in functions.php directly to check. Hope this will help you.

0
votes

Searching how to hide specific category from WooCommerce side bar, this code will help you.

Go to Products> Categories> Click edit on the category you want to remove. Once category page is open, you can find the category id in the url, copy that id. WooCommerce hide category from side Then open the functions.php file under appearance> theme editor. Just paste the below code at the end and please replace categories id (in italic) with your category id.

add_filter( ‘woocommerce_product_categories_widget_args’, ‘woo_product_cat_widget_args’ );

function woo_product_cat_widget_args( $cat_args ) {
    $cat_args[‘exclude’] = array(‘1725’,’1721′,’1719′,’1722′,’1723′,’1724′,’1725′,’1726′);
    return $cat_args;
}

https://phpfresh.com/hide-categories-from-woocommerce-sidebar/