WooCommerce PHP Beginner Requires WooCommerce

Hide the Shop Page Title

Hide the "Shop" heading and product category titles on WooCommerce archive pages, with optional lines to hide their descriptions too.

Tested on WordPress 7.1 PHP 8.3 Updated
functions.php 6 lines
// Hide the title on the shop page and on product category and tag archives.
add_filter( 'woocommerce_show_page_title', '__return_false' );

// Optional: also hide the archive descriptions. Remove the // to use them.
// remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
// remove_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 );

Where to add this

Recommended A code snippets plugin Survives theme changes and is easy to switch off.
Child theme At the end of your child theme's functions.php file.
Must-use plugin As a .php file in wp-content/mu-plugins, starting with <?php.

Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.

Many store designs put their own hero or banner at the top of the shop, so WooCommerce’s plain “Shop” heading ends up duplicated. This snippet removes it on the main shop page and on product category and tag pages.

How it works

WooCommerce’s classic archive template checks the woocommerce_show_page_title filter before printing the heading. Returning false hides it on every product archive. The commented-out lines remove the two functions WooCommerce hooks to woocommerce_archive_description: one prints product category and tag descriptions, the other prints the shop page’s own content.

The previous version of this snippet also hooked a filter called woocommerce_taxonomy_archive_description, which doesn’t exist, so that part did nothing.

Block themes

If your theme is a block theme, the shop is built from the Product Catalog template in the Site Editor, which uses an Archive Title block. The filter doesn’t affect that block. Remove or hide the block in the template instead.

Things to watch

Headings help screen reader users and search engines understand the page. If you hide WooCommerce’s title, make sure your custom banner includes a real <h1>.

How to test it

Open your shop page and a product category. The heading above the products should be gone, and the products and sorting dropdown should be unchanged.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only