Support » Fixing WordPress » The wp_list_pages() function does not display private pages

  • Hi

    It seems that as soon as you mark a page as “private” it disappears from the wp_list_pages() output even though I am logged in as the admin and created the page in question with the same account. I tried it on a fresh WordPress 2.2.1 install with the default theme and it confirms my finding.
    I do not believe this should be the correct behaviour as the post behave as expected.

    I did try the many different access restriction plugins out there but they either do not work well with WordPress 2.2.1, or conflict with other plugins (Event Calendar 3 or ical4wp for instance)

    I could not find a trace of this behaviour anywhere in the forums or in the bug database. Can anyone replicate my finding? As anyone found a workaround? I certainly could hard code the link to the pages but the function is really much more elegant and flexible and using the private pages is the best solution for my purpose and insure the best forward compatibility.



Viewing 6 replies - 1 through 6 (of 6 total)
  • Update :

    Related to an issue raised here 5 months ago with wordpres 2.1

    I have same problem, why private pages are invisible ?

    Thank you for your responses.

    Best regards,

    Anyone look at wp_list_pages() doc? Perhaps there’s on option you can add to display “private” on the admin pages but not the front page.

    I did, and quite extensively.
    The Documentation page on wp_list_pages() is quite clear and states amongst other points:

    By default, the usage shows:

    * All Pages and sub-pages are displayed (no depth restriction)
    * Is not restricted to the child_of any Page
    * No pages are excluded
    * Is not restricted to any specific author
    * Includes all Pages
    * Not restricted to Pages with specific meta key/meta value

    Yet the private pages do not appear even when logged as admin.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    This is a general problem with get_pages and get_posts and there’s no simple fix for it yet. Sorry.

    Is there any update on this?

    I swear it worked momentarily then I changed something and it doesn’t work anymore.

    It’s a real pain in the ass because I’m developing this blog for a customer who wants to restrict access to specific pages based on authentication.

    Is there any other functions or work arounds for this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘The wp_list_pages() function does not display private pages’ is closed to new replies.