The page title “Shop” shown on the WooCommerce shop page by default is just plain ugly in my opinion. Especially if you use the WooCommerce shop page as your website’s homepage.
Most of the PHP code pieces (or CSS snippets) floating around for removing this “Shop” page title will also remove proper/descriptive page titles from archive pages (like category and tag pages).
If you only want to remove the page title from the shop homepage and leave all WooCommerce archive pages as is, use this piece of PHP code:
add_filter( 'woocommerce_page_title', 'ehi_woocommerce_page_title' ); function ehi_woocommerce_page_title( $page_title ) { if(is_shop() && $page_title == 'Shop') { return ""; // Or enter the text you want to show instead of "Shop" } else { return $page_title; } }
The conditional statement above is…
if(is_shop() && $page_title == ‘Shop’)
…in case the ampersands get mangled by CMS formatting.
That code goes inside your themes functions.php file.
Leave a Reply