[wp-hackers] Creating an "Author Cafe"

Dion Hulse (dd32) wordpress at dd32.id.au
Thu Oct 1 10:03:01 UTC 2009


How about, instead of excluding, you include specifically?

Create a new post, Set its post_status to 'private-author-cafe' or similar
filter the WHERE clause if the current user is an editor or admin, of  
"($old_where) OR post_status == 'private-author-cafe'

Seems like a possibility..

On Thu, 01 Oct 2009 19:50:18 +1000, Austin Matzko <if.website at gmail.com>  
wrote:

> On Thu, Oct 1, 2009 at 12:32 AM, William Canino
> <william.canino at googlemail.com> wrote:
>> I'm thinking of creating one post, comments enabled, say post_id =
>> 100, that is visible only to authors and editors.  This post mustn't
>> appear in feeds or to non-authors, and its comments mustn't appear in
>> the comments feed.
>>
>> All the plugins I've seen that offer to do this seem to use a WP_Query
>> filter callback. It seems a big waste for the blog to scan each and
>> every query post array and take out this one post for 99% of the
>> world.  Is there a better way?  Do you have a better suggestion?
>
> You could use the posts_where filter, and append a WHERE clause to
> every non-relevant query:
>
> " AND {$wpdb->posts}.ID != 100"
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


-- 
--
Dion Hulse
e: contact at dd32.id.au
w: http://dd32.id.au/
m: 04 6621 9112 (+614 6621 9112)
WordPressQI: http://wordpressqi.com/


More information about the wp-hackers mailing list