Storefront theme adds a “Home” H1 title to the homepage by default, no matter if you use the “Default” or the “Homepage” static page template.

Of course, you could do it via CSS, with a simple “display:none”. Even better, you could completely avoid loading the “Home” title by using PHP (SEOs out there: better not to load an H1 than hiding it via CSS, right?).

So, how do they do it (I mean how to hide the Storefront “Home” title)? Here’s the quick fix!

Storefront theme: how to remove the homepage title

PHP Snippet 1: Remove Homepage Title @ Storefront (“Homepage” Page Template)


/**
 * @snippet       Hide Homepage Title - Storefront Homepage Page Template
 * @how-to        Get CustomizeWoo.com FREE
 * @sourcecode    https://businessbloomer.com/?p=79966
 * @author        Rodolfo Melogli
 * @compatible    Woo 3.5.3
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_action( 'wp', 'bbloomer_storefront_remove_title_from_home_homepage_template' );

function bbloomer_storefront_remove_title_from_home_homepage_template() {
	remove_action( 'storefront_homepage', 'storefront_homepage_header', 10 );
}

PHP Snippet 2: Remove Homepage Title @ Storefront (“Default” Page Template)


/**
 * @snippet       Hide Homepage Title - Storefront Default Page Template
 * @how-to        Get CustomizeWoo.com FREE
 * @sourcecode    https://businessbloomer.com/?p=79966
 * @author        Rodolfo Melogli
 * @compatible    Woo 3.5.3
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

add_action( 'wp', 'bbloomer_storefront_remove_title_from_home_default_template' );

function bbloomer_storefront_remove_title_from_home_default_template() {
	if ( is_front_page() ) remove_action( 'storefront_page', 'storefront_page_header', 10 );
}

Share:

Leave a Reply