Hi, Does anyone know how to hide certain categories and all their post at wordpress? Is there any plugins that can do that? which we can select which categories(and all post on it) that we want to be visible at our blog. Thanks
Pretty easy to do by adding arguments to the wp_list_categories(); function. http://codex.wordpress.org/Template_Tags/wp_list_categories You'd have to add this: <?php wp_list_categories('title_li=&exclude=9,10'); ?> PHP: With 9 and 10 being the category ID numbers you want to exclude. Of course if you don't have the title_li= already in your code just do something like this: <?php wp_list_categories('exclude=9,10'); ?> PHP: Just wanted to demonstrate how to use the & for multiple arguments. To hide the posts you'd probably have to do a custom query. http://codex.wordpress.org/Template_Tags/query_posts Add this before your loop starts: <?php query_posts("cat=-9,-10"); ?> PHP: With 9 and 10 being categories you want to exclude.
any posts that you want hidden can be password protected, as for the categories use the suggestion above.
thanks guys, but I had more than 200 categories..I wanted to find an easy way such as a plugin that list all the cat and we can just tick which cat that we want to visible/hidden. anyone?
Actually I just found this plugin. It may work better for you and wouldn't require any template file edits. Category Visibility Plugin - http://www.ryowebsite.com/?p=46 It says it can hide posts in those categories too. Never used it myself so I can't personally vouch for it...good luck.
thanks for the link, fish I try to look into it first..btw there is new updated page for that plugin : http://www.ipeat.com/?page_id=91 will test it with my site soon. thanks
seem like the lugin has a bug..all the function is there..but when I try to uncheck the visibility of one category it keep on returned to default state when I update the setting. And when I try to view my page all the categories and post are gone..got this error msg : "Sorry the post you looking for had been deleted" I think have to wait for next update..