[Support request] Remove page title woocommerce shop page

Home Forums Support [Support request] Remove page title woocommerce shop page

Home Forums Support Remove page title woocommerce shop page

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #940694
    Sam

    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

    #940745
    David
    Staff
    Customer Support

    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.

    #940757
    Sam

    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

    #940778
    David
    Staff
    Customer Support

    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.

    #940782
    Sam

    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

    #940798
    David
    Staff
    Customer Support

    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;
    }
    #940866
    Sam

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

    #940886
    David
    Staff
    Customer Support

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

    #940899
    Sam

    Yeah looks good, thanks for the help.

    #940945
    David
    Staff
    Customer Support

    You’re welcome

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.