Remove WooCommerce Product Title in Archive/Category Page

Hello!

I’m trying to remove the WooCommerce Product Title from archive and category pages, but can’t quite seem to get it. I currently have a site running on Pro.

All research I’m doing is pointing towards the following snippet doing the trick:

remove_action( ‘woocommerce_shop_loop_item_title’, ‘woocommerce_template_loop_product_title’, 10 );

However, this doesn’t seem to work. I just wanted to see if Pro had made adjustments that would be affecting that code.

Thanks!

Hey ComDoc,

Thanks for writing in!

Please have your code updated and use this:

remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
remove_action( 'woocommerce_shop_loop_item_title', 'x_woocommerce_template_loop_product_title', 10 );

We would love to know if this has worked for you. Thank you.

Hi, @RueNel!

I popped that into the child functions.php and it doesn’t appear to be removing the product title from the product archive.

Any other ideas?

Hi @comdoc-marketing,

Could you try this instead?

add_action('wp_head', 'shop_title_override', 9999999999999);

function shop_title_override() {
   remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );
   remove_action( 'woocommerce_shop_loop_item_title', 'x_woocommerce_template_loop_product_title', 10 );
}

It could be the code was executed earlier, hence, let’s make it later than the previous one by adding it in wp_head hook.

Thanks!

1 Like

Thanks @Rad and @RueNel!

That last snippet seemed to do it.

Have a good one!

You’re always welcome @comdoc-marketing!

Cheers.

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