admin管理员组文章数量:1325359
I have been searching online for this and everywhere I go it says to put the following into your functions.php
function remove_title_from_home() {
remove_action( 'storefront_homepage', 'storefront_homepage_header', 10 );
}
add_action( 'woocommerce_show_page_title', 'remove_title_from_home' );
OR
function remove_title_from_home() {
if ( is_front_page() ) remove_action( 'storefront_page', 'storefront_page_header', 10 );
}
add_action( 'woocommerce_show_page_title', 'remove_title_from_home' );
Just in case there is an update to the theme which will overwrite this as I am not using a child theme, I put them into a plugin file I created a long time ago (custom-functions.php) and all other functions I have put in there work. I have cleared WP caches and browser caches, yet neither of the suggestions above are working for me. Even though the same is suggested at StackOverflow
The answer here at Removing title from page is not good for SEO and Woocommerce: How to remove page-title at the home/shop page but not category pages doesn't seem to help me as the suggestions are not working for me.
The homepage content is the only page I am displaying on the front (home) page
Has there been a change to the Storefront Theme since these answers were put together or is there something I am possibly doing wrong?
I have been searching online for this and everywhere I go it says to put the following into your functions.php
function remove_title_from_home() {
remove_action( 'storefront_homepage', 'storefront_homepage_header', 10 );
}
add_action( 'woocommerce_show_page_title', 'remove_title_from_home' );
OR
function remove_title_from_home() {
if ( is_front_page() ) remove_action( 'storefront_page', 'storefront_page_header', 10 );
}
add_action( 'woocommerce_show_page_title', 'remove_title_from_home' );
Just in case there is an update to the theme which will overwrite this as I am not using a child theme, I put them into a plugin file I created a long time ago (custom-functions.php) and all other functions I have put in there work. I have cleared WP caches and browser caches, yet neither of the suggestions above are working for me. Even though the same is suggested at StackOverflow
The answer here at Removing title from page is not good for SEO and Woocommerce: How to remove page-title at the home/shop page but not category pages doesn't seem to help me as the suggestions are not working for me.
The homepage content is the only page I am displaying on the front (home) page
Has there been a change to the Storefront Theme since these answers were put together or is there something I am possibly doing wrong?
Share Improve this question asked Aug 26, 2020 at 15:30 Chris RogersChris Rogers 12310 bronze badges1 Answer
Reset to default 2Try this:
add_action( 'wp', 'storefront_remove_title_from_home_homepage_template' );
function storefront_remove_title_from_home_homepage_template() {
remove_action( 'storefront_homepage', 'storefront_homepage_header', 10 );
}
or if you use default template
add_action( 'wp', '_storefront_remove_title_from_home_default_template' );
function storefront_remove_title_from_home_default_template() {
if ( is_front_page() ) remove_action( 'storefront_page', 'storefront_page_header', 10 );
}
本文标签: Woocommerce How to remove page title from storefront theme homepage
版权声明:本文标题:Woocommerce: How to remove page title from storefront theme homepage 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742152484a2423429.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论