让WordPress指定分类下的所有日志不在首页显示3+

2008.12.04 | Tags: , ,

WordPress图标
有些文章显示在首页不大美观,于是想让它们不显示在首页.在网上Google了下发现 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.

  简单的说,这个插件可以让一个或多个分类的文章不显示在首页上.

  安装说明:下载这个插件,然后登陆您的博客后台,管理–>分类,记下你不想在首页的分类的ID,有些人可能找不到 ID .我是没找到当时 ,在分类列表里面 点打开你所要不显示的 分类名字 在地址来可以看到 最后面id= 这个 =后面就是你的 id 号!!然后打开插件的 front_page_excluded_cats.php 这个文件,在第13行左右找到$cats_to_exclude 这个东西,将你不希望显示在首页的分类的ID填写在 $cats_to_exclude 后面的等号的后面.如果你不希望ID为21和22的分类显示在首页,你只需将那行修改为:

$cats_to_exclude = ‘21,22′;

即可.


  1. 1 牧狼羊
    2008.12.04 / 23:28

    这个哪用插件啊,影响博客速度。。。

  2. 2 伊迭
    2008.12.05 / 13:04

    牧狼羊 :
    这个哪用插件啊,影响博客速度。。。

    插件是方便新手,和懒人用的…不是每个人都会代码的,有插件比较方便嘛。

  3. 3 阿里客服
    2009.01.22 / 12:06

    偶因为这个问题都快困死了,你说的这个件偶用了,但不管用,B与G上搜的文章也不少了,但没成功,哪位大哥可以帮帮偶呀!