Tutorials

How to Remove Page Titles from Woocommerce Pages

In this tutorial, you will learn how to remove page titles from woocommerce pages. Woocommerce comes with a lot of hooks and filters, so we are going to use a filter to do this job.

function wc_hide_page_title()
{
	return false;
}
add_filter( 'woocommerce_show_page_title', 'wc_hide_page_title' );

The above code will remove titles from all woocommerce pages. In case, you want to remove it from a specific page then we need to use conditional tags available in woocommerce. Lets remove titles from Shop page only.

function wc_hide_page_title()
{
	if( !is_shop() ) // is_shop is the conditional tag
		return true;
}
add_filter( 'woocommerce_show_page_title', 'wc_hide_page_title' );

The above code will return true in case the current page is not a shop page. Hence, the title will be displayed on pages other than Shop page.

2 thoughts on “How to Remove Page Titles from Woocommerce Pages

  1. Rachel Shaw

    Where do I input the code?

    1. Mohit Chawla Post author

      You need to input this code in functions.php file

Leave a Reply

Your email address will not be published. Required fields are marked *