Site logo

Archived topic

Remove page title woocommerce shop page

9 replies · Started by Sam on June 25, 2019

Viewing posts 1–10 of 10

Hi, I have been trying to remove the page title on the WC shop page with a Layout Element, but it does not seem to work. Can you give me some guidance?

thanks

Hi there,

you can remove the Page Title in the Customizer > Layout > Woocommerce under the Shop settings.
Category Archive pages are a little more of a pain and require some CSS. Let me know.

Hi David, thanks I missed that setting. Although, it removes the page title on the shop page and all category archive pages as well. I would only like to remove it on the shop page.

thanks
sam

You could try this function:

add_filter( 'woocommerce_show_page_title', 'not_a_shop_page' );
function not_a_shop_page() {
    return boolval(!is_shop());
}

Not sure if its still works with the latest Woo.

Hi David, thanks what does it do? Does it remove the title on the shop page, or make sure it shows on the non-shop pages if the setting in the customizer is set?

thanks

So if you have the customizer set so its displaying Titles then that should effectively only return the title if it is not the shop page. But woo was updated since that code was generated by a stackoverflow user so not sure if its still applicable.

If not the simplest way is to use some CSS, like this:

.post-type-archive-product .woocommerce-products-header {
    display: none;
}

Thanks, so that css will hide it only on the shop page?

Yeah - i tested it on a couple of your categories and it worked ok.

Yeah looks good, thanks for the help.

You're welcome

This archived topic is closed to new replies.