WooCommerce StoreFront子主题-如何删除主页上的标题 [英] WooCommerce StoreFront child theme - How to remove title on homepage

查看:335
本文介绍了WooCommerce StoreFront子主题-如何删除主页上的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否知道要删除StoreFront主题首页上的标题的任何钩子或过滤器?

Do you know any hook or filter to remove the title on the frontpage of StoreFront theme?

我尝试了几种解决方案,但没有任何效果.我使用Storefront(Woothemes的Stationery)的主题子代.

I try several solutions but nothing works. I use a theme child of Storefront (Stationery by Woothemes).

感谢您的帮助.

推荐答案

尝试将此代码添加到functions.php:

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

这应该删除(包括)之间的所有内容:

This should remove everything between (and including):

<header class="entry-header">
    <?php
        storefront_post_thumbnail( 'full' );
        the_title( '<h1 class="entry-title">', '</h1>' );
    ?>
</header><!-- .entry-header -->

这篇关于WooCommerce StoreFront子主题-如何删除主页上的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆