How to Change WooCommerce Shop Page Title

Share this:

In this tutorial, i will demonstrate 2 code snippets to update or hide the page title for default WooCommerce Shop page.

The default Shop page for WooCommerce online store will show the “Shop” at the top of products row.

WooCommerce Default Shop Page Title

WooCommerce Default Shop Page Title

 

Option 1 : Change Shop Page Title

In order to change the title from “Shop” to any title, you can put below code to your  end of your theme functions.php file:

add_filter( 'woocommerce_page_title', 'custom_woocommerce_page_title');
function custom_woocommerce_page_title( $page_title ) {
  if( $page_title == 'Shop' ) {
    return "WooCommerce Demo Products";
  }
}
WooCommerce Custom Shop Page Title

WooCommerce Custom Shop Page Title

 

 

Option 2 : Hide Shop Page Title

If you want to hide the “Shop” page title, you can put below code to your theme functions.php:

add_filter('woocommerce_show_page_title',false);
Hide WooCommerce Shop Page Title

Hide WooCommerce Shop Page Title

 

Hope above snippets can help you to customize your shop easily. Cheers!

6 Comments

  1. I came to this code, based on yours:

    add_filter( ‘woocommerce_page_title’, ‘custom_woocommerce_page_title’);
    function custom_woocommerce_page_title( $page_title ) {
    if( $page_title == ” ) {
    return “some custom name”;
    }else{
    return $page_title;
    }
    }

    It could be used in case you don’t link the main (default) page of the WooCommerce shop to any page in WordPress, which results in a WooCommerce main page not showing any title at all. Hence the ($page_title == ”). My ‘else’ addition in the code forces other (category) pages in the shop to still show their original titles.

    I’m not a coder and hadn’t come to this solution without you. So thank you very much, I appreciate your posting.

  2. Hi,

    Great tips! And a potential life saver for me!

    Instead of keeping to a fixed page title as in Option 1, Terry is there a way to show the category of the respective product instead? Eg, if the product details page can display the Category the product belongs to as the page title..

    Can someone can help me.

    Thanks in advance!
    Greg

  3. Hi Terry,

    Its more like just the category [Product Category Name] will do.. however, it must be able to fetch the correct category the currently displayed product belongs to.. FYI, i only use 1 level category..

    Thanks terry, for responding..!

    Cheers

  4. Hi Terry. thank you for your post. I’m using Jupiter Responsive Magazine Theme with Woocommerce. I want to change the default tile “Our Shop” in another title. I used your code in function.php changing Shop with Our Shop ma it’s no work. Any suggestions?
    Thanks in advance
    Fabio

Leave a Comment.