I have a public blog but would like to have a section just for my own private notes? What is the easiest way to do this? Is there a way to make an entire category of post private?
3 Answers
You could perhaps:
1) Create the category for your Private posts, e.g. "Private"
2) Exclude the "Private" category from your main Loop
3) Output the "Private" category using a custom template file, e.g. category-private.php
4) Wrap the Loop in category-private.php
in an if ( is_user_logged_in() )
conditional
(This assumes, of course, that you are the only user of your site. You will need to modify if you have additional users.)
EDITED TO ADD:
5) Wrap the Loop in single.php
in an `if ( is_user_logged_in() || ! is_category( 'private' ) ) conditional.
6) Add an exclude=#' argument, where
#is the Category ID of the "Private" Category, to any call to
wp_list_categories()`.
-
Would this exclude 'Private' from showing up in any tag cloud or category cloud or list?– BrigApr 11, 2011 at 18:02
-
Hmm... probably not. You would need to add an
exclude
argument towp_list_categories()
if it appears anywhere. Apr 11, 2011 at 18:09 -
Try this: Private Suite
"Allows you to choose who can read private content and offers better control of privacy features."
I have been a long time user of the Wordpress CAPA plugin, wich does exactly what I think you are looking for.