WordPress根据文章类别显示或隐藏文章标题

嗨, 我有一个wp网站, 我正在使用avada主题。我想根据其类别隐藏标题。例如, 如果帖子类别为” A”, 那么我不想自动在顶部显示标题。我知道我可以在每个帖子的帖子设置中手动调整它, 或者在下面设置一个布局并选择该布局, 但是我不想每次都处理。

因此, 我尝试在archives.php中使用if语句。它是这样的:

<?php if(has_category( 'A' )) : ?>    //i also try in_category and on_category

<?php  else: ?>
    <?php get_header(); ?>
<?php endif; ?>

但它可能是针对类别页面本身, 而不是帖子。

有人可以帮忙吗?

谢谢 :)


#1


你好, 你可以使用以下链接, 并遵循可能有效的给定解决方案。

这里显示了如何隐藏特定的c *** ate分类头帖子*** …

https://wpquestions.com/Remove_header_or_styling_from_specific_category_of_posts/11505

来源:

https://www.srcmini02.com/64505.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_37438.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?