[wp-hackers] List Private pages?

Filipe Fortes fil at fortes.com
Thu Mar 29 18:48:56 GMT 2007


Chris --

Check my post levels plugin (
http://fortes.com/projects/wordpress/postlevels ) -- it conditionally pulls
up private pages (and posts)

-fil

On 3/29/07, Chris <chris.hearn01 at ntlworld.com> wrote:
>
> Thanks Guru,
> 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.
> Thanks
> Chris
>
>
> 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
> > http://neosmart.net/blog/
> >
> >
> >> -----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?
> >>
> >> Hi,
> >> 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
> >> e.g.
> >> wp_list_pages('title_li=<h2>'.__('Fleets').'</h2>&child_of=13&post_stat
> >> us=')
> >> The get_pages() code seems to be hard-coded to post_status='publish'.
> >>
> >> Can you recommend a way to do this?
> >> Thanks
> >> Chris
> >>
> >>
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> >
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list