[wp-hackers] Enhance WP to use page categories
fil at fortes.com
Thu Jan 25 00:57:38 GMT 2007
My post levels plugin sets the post status to private* and relies on a
custom field to determine who can see it -- I've definitely had future
proofing issues (the plugin gets broken every major, and some minor, release
I've figured out how to use the query filter to change the necessary sql to
get category counts, archives, pages, etc to work -- but it's quite hacky.
Takeaway: Using post_status was not the path of least resistance :) But it
does ensure that private posts aren't shown if the plugin gets disabled
On 1/24/07, Mark Jaquith <mark.wordpress at txfx.net> wrote:
> On Jan 21, 2007, at 9:12 AM, Chris wrote:
> > However, it does not seem possible to categorize pages so that
> > there is a "public view" accessible to all, and a "members" view,
> > which might include the public view, but also show more restricted
> > pages.
> The only thing that I can think is that this will mess up the
> category post counts, although there might be other side effects.
> One other way to do this would be via Custom Fields (i.e. the $wpdb-
> >postmeta table). This would allow you to set flags on the pages
> that determine private/public status. You could have this assigned
> automatically if a page is a child of a "private" ultimate parent
> page (just use get_page() and crawl up the $page->post_parent ladder
> until you reach the top and then do an ID comparison). this might
> end up being more future proof.
> Mark Jaquith
> Covered Web Services
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers