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.

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"; } }

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);

Hope above snippets can help you to customize your shop easily. Cheers!
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.
Hi Henk, thanks for your sharing code, it is indeed a better way to show custom page title. Cheers!
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
Hi Greg, do you mean to display in format: “[Product Category Name] – [Product Name]” for the page title?
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
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
Hello Terry. I appreciate what you did here. the one line code to hide the title is really smart. I´ve seen others saying you couldn´t do it that way, but you´re the man!
I´d like to do one more thing on the shop page which is removing the text “showing all x results” that appears under the title. Do you have a code for that also?
you can paste this code into theme functions.php:
I get this error when I try to add this to my functions.php
Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /home/****/public_html/wp-includes/plugin.php on line 214
cant figure out what to do
Hi LCG, what function have you added into functions.php that caused that error?
the code from above to remove shop title
add_filter(‘woocommerce_show_page_title’,false);
is there something missing from plugins php?
Thanks Terry- that worked nicely.
Hi, Im trying to work out a version of this code that will only alter the heading of product-tag archives. For example on this page:
http://flyinglessons.co.uk/location/south-east-england/
The product tag is ‘south east england’ but I need the title to read ‘Shop for Flying Lessons in South East England’. Is there a way to add the phrase ‘Shop for Flying Lessons in’ before the tag title on every product-tag archive page?
Thanks,
Jake
For anyone getting the error:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /*****/plugin.php on line 214
Use this code instead:
add_filter(‘woocommerce_show_page_title’,’sswoo_show_page_title’);
function sswoo_show_page_title() {
return false;
}
Mat is right on this.
If you provide a bool value as parameter you’ll get a Warning like,
“Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /*****/plugin.php on line 214”
There is a shorthand option also.
add_filter(‘woocommerce_show_page_title’, ‘__return_false’);
__return_false is a WP defined function which return false.
Hi Terry!
My website has double headers on each page. The first header is ok but the second header which generated by Woocommerce is hidden by CSS ‘display:none;’. I wanna remove the Woocommerce header but when I’ve tryed to insert your code:
add_filter(‘woocommerce_show_page_title’,false);
but this is calls an Error:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /web1/mcgtimber.co.uk/wp-includes/class-wp-hook.php on line 274
Try to find ‘h1’ in a code:
http://www.mcgtimber.co.uk/product/32mm-x-150mm-loglap-softwood-timber-cladding/
What did I do wrong?
Error is gone but add_filter doesn’t work. There are still two H1 tags on the page.
I’ve found a solution.
It is needed to remove one of actions which called in woocommerce/includes/wc-template-hooks.php.
I added this string in my Functions.php and double H1 was gone:
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_title’, 5 );
Hi,
This is exactly what I need, but couldn’t get it to work. Got parse errors, which broke the site, and I had to erase the new code via FTP in order to restore. Any ideas?
AMAZING! Looked far and wide for this and you’ve got it working for me. Thanks a million!