[wp-hackers] List Private pages?
chris.hearn01 at ntlworld.com
Thu Mar 29 17:57:51 GMT 2007
yes, is_page tells me it's a page, but not the page status. (I want to
show pages on the menu system if a user is logged in (not not if they
are not logged in).
The problem is I cannot retrieve private pages, only published pages.
The reason i want to do this is I want to show published pages all the
time (i.e. as any normal blog would), but only show private pages when a
user is logged in. I can't find a way to retrieve private pages with
this function, for reason given below.
Computer Guru wrote:
> You can grab the page as post... then check with is_page() to do anything
> you might want to modify - unless I'm understanding you the wrong way.
> Pages are supposed to be static, so I guess they're not checked as much. But
> the only difference between a post and a page is in the way they're
> displayed in the theme (and categories and stuff, but that's really beyond
> the point).
> Computer Guru
> NeoSmart Technologies
>> -----Original Message-----
>> From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-
>> bounces at lists.automattic.com] On Behalf Of Chris
>> Sent: Thursday, March 29, 2007 1:59 PM
>> To: wp-hackers at lists.automattic.com
>> Subject: [wp-hackers] List Private pages?
>> I want to show menus which include pages marked as private IF a user is
>> logged in.
>> I tried overriding, but that does not work
>> The get_pages() code seems to be hard-coded to post_status='publish'.
>> Can you recommend a way to do this?
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers