In this instructional exercise, I will exhibit two way of code snippet to change or conceal/hide the page title for default WooCommerce Shop page.
In a WooCommerce online store, the default option of shop page title will be “Shop” at the products row
Alternative 1 : Change the Shop Page Title
So as to change the title from “Shop” to any title, you can put underneath code to your functions.php file of your theme.
Even this functions.php file can be found under Dashboard –> Apppearance –> Editor
1 2 3 4 5 6 | add_filter( ‘woocommerce_page_title’, ‘custom_woocommerce_page_title’); function custom_woocommerce_page_title( $page_title ) { if( $page_title == ‘Shop’ ) { return “WooCommerce Demo Products”; } } |
Once the above code has been added, Save it and refresh your Shop Page.
If the above code is not working , then follow with this second option.
Alternative 2 : Hide Shop Page Title
If you need to hide the “Shop” page title, then you can place below code to your theme functions.php file.
1 | add_filter(‘woocommerce_show_page_title’,false); |
Once the above code has been added, Save it and refresh your Shop Page. So your Page title will not be displayed in the particular page