让指定分类的文章在WordPress首页不显示
你有一些文章(比如隐私或广告)不想在Wordpress首页显示吗?如果有的话那你就要用到这个插件了:Front Page Excluded Categories(点击链接即可到官方下载)。 官方的描述是:
A basic plugin that excludes posts in one or more categories from appearing on the front page. This is especially useful if you use an automated posting system, like the del.icio.us bookmark blog posting feature, that updates your blog regularly. In such a case, you can assign these posts to an excluded category so they don't appear on the front page, but do appear in a category page.
意思就是让你指定的一个或多个分类的文章不在首页显示。 使用方法:
- 下载,并上传到:wp-content/plugins目录下
- 登陆后台,插件-启用
- 打开所下载的front_page_excluded_cats.php文件,找到$cats_to_exclude(约第14行),将后面的数字改为你希望不在首页显示的分类的ID,如果有多个的话用英文的逗号割开
保存后在首页就看不到你指定的分类的文章了,不过其他地方还是可以看到的,比如日志分类或直接输入地址又或者搜索,不过我觉得这样已经达到我们的目的了。
需要注意的是:要把该日志的 所有分类(如果有)的 ID 及标签的 ID 都写上,漏了一个都不行。