// March 8th, 2005 // 171 Comments » // Techie
I was using an old WordPress hack called Show Categories to get around the problem of my not wanting all posts of certain categories showing up on the front/main page. It worked…somewhat. But there were things it didn’t work on, such as feeds and sometimes searches and archive links. There are additional hacks I could do to fix that, but I thought instead that perhaps a new plugin was in order.
This plugin, which is very much in beta, only works in WordPress 1.5+. It adds a new menu link under the “Manage” admin menu titled “Category Visibility”. Once you activate the plugin, go to this menu and you’ll see the visibility settings for all categories. So far I’ve listed options for “Front”, “List”, “Search”, “Feed” and “Archives”, defined as:
- Front: All posts in the category will not show up on the main page
- List: The category will not show on the list of categories on the home page (i.e., the list in the sidebar here)
- Search: The category’s posts will not show up in search results
- Feed: The category’s posts will not show up in the main RSS/Atom feed
- Archive: The category’s posts will not show up in archive links (i.e., clicking on the calendar links)
I did not get a chance to test with inherited categories, so if that breaks let me know. I may get around to testing that sometime.
You can grab the latest version here (Version: 0.31)
NOTE: If you’re using the default download of WordPress version 1.5 (i.e., NOT 1.5.1 or above) download the version here. There’s a database change made in the nightlies that made this necessary for now.
IMPORTANT: As of version 0.28, these versions will create a new table and not use your existing one, so write down the current values if you’re using an older version of this plugin before installing and running this version!
To Do:
- Put this plugin on WP-Plugins.org (in progress)
- Allow per-post visibility option. Should be as simple as adding a custom field for posts.
- Fix issue with number of posts on front page when some are marked to not show up (i.e., you specify 10 posts per page, two of those are marked not to show on the front page, so you instead only see eight posts)