wordpress最新文章列表排除禁止显示某个特定分类的方法-WordPress主题

摘要:在wordpress主题最新文章列表内排除某个特定分类的方法,网站有很多介绍,今天大挖给大家介绍一种最有效的方法之一。

在wordpress主题最新文章列表内排除某个特定分类的方法,网站有很多介绍,今天大挖给大家介绍一种最有效的方法之一。

只需要将下面的代码复制到 functions.php 文件中即可。

里面的-4,-23指的是分类的id,通过文章-分类,查看分类id然后通过id禁用最新文章列表中显示该分类的文章即可

来源:http://www.wazhuti.com/1408.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_13171.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?