之前已经问过这个问题,我在这里尝试了很多解决方案,但没有一个能为我工作 . 我已经使用woocommerce店面主页模板将主页设置为静态页面,并且想要删除页面 Headers Headers . 我已经尝试将此代码添加到我的functions.php中,但它什么也没做,
if ( is_front_page() ) {
remove_action( 'storefront_page', 'storefront_page_header' );
}
我尝试过以下答案:
How to hide page title from WooCommerce Storefront theme homepage?
&
WooCommerce StoreFront child theme - How to remove title on homepage
以下代码有效,但仅适用于商店页面 . 我找不到主页的条件标签 .
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' );
没有人使用插件,任何人都可以帮助我这样做 . 谢谢!
2 回答
试试这个
请在主页或任何特定页面上尝试以下代码 hide the Page Title .