0

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?

1
  • 1
    Silly suggestion: just don't publish the private notes? Keep them as drafts?
    – Jan Fabry
    Commented Apr 11, 2011 at 20:26

3 Answers 3

1

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 towp_list_categories()`.

3
  • Would this exclude 'Private' from showing up in any tag cloud or category cloud or list?
    – Brig
    Commented Apr 11, 2011 at 18:02
  • Hmm... probably not. You would need to add an exclude argument to wp_list_categories() if it appears anywhere. Commented Apr 11, 2011 at 18:09
  • I added a couple of other steps. Commented Apr 11, 2011 at 18:14
1

Try this: Private Suite

"Allows you to choose who can read private content and offers better control of privacy features."

0

I have been a long time user of the Wordpress CAPA plugin, wich does exactly what I think you are looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.