[wp-hackers] Add a Filter or use new PRIVATE status (WP2.1)

Chris chris.hearn01 at ntlworld.com
Wed Mar 14 09:38:08 GMT 2007

My club site needs areas that are private to only club members. I have 
constructed a page menu system that shows extra options (pages) when a 
member logs in.
Posts can be made to categories that are children of cat=public, 
I want to prevent posts that belong in "member" cat and sub-cats from 
showing if visitor is not logged in (i.e. not a member).
I can do that on the index template by excluding cat "members", but I 
need to tackle how to also hide in the "Recent Posts", Calendar, Events etc.

So to the question ? How to do this in WP2.1?

There seem to be 2 possible ways...

a) Setting every "member area" post status = PRIVATE. the fixing the 
get_post() so that it respects the private status..
Is this already implemented? I cant find any info on it!

b) adding some sort of filter that filters out everything in cat=members 
if user not logged in
But where to attach this filter to have global impact and work with the 
plugins? assuming I can make the filter in the first place!

I think there might be some code function that helps, but have searched 
the docs and forums without much success..


    Chris Hearn 
    *Tel:* 01625 827589 
    *Mob:* 07768 725141 
    *email:* chris.hearn01 at ntlworld.com 
    The information transmitted is intended only for the person or entity 
    to which it is addressed and may contain confidential and/or privileged 
    material. Any review, retransmission, dissemination or other use of, 
    or taking of any action in reliance upon, this information by persons 
    or entities other than the intended recipient is prohibited. 
    If you received this in error, please contact the sender and delete the 
    material from any computer. 

More information about the wp-hackers mailing list