WordPress.org

Ready to get started?Download WordPress

Forums

Stumped on sub-page lister (2 posts)

  1. aluminumcans
    Member
    Posted 8 years ago #

    I'm using the sample on this page:

    http://codex.wordpress.org/Template_Tags/wp_list_pages#List_Child_Pages

    which is here:

    <?php if(wp_list_pages("child_of=\".$post->ID.\"&echo=0\")) { ?>

      <?php wp_list_pages("title_li=&child_of=\".$post->ID.\"&sort_column=menu_order&show_date=modified&date_format=$date_format\");?>

    <?php } ?>

    to list the child pages. I have the above code in a page_sidebar.php file that I am including in my page.php template.

    Alas, nothing happens. No error...the page_sidebar.php is just never loaded. If I remove the PHP tag above from that file, then it is included.

    Not sure what to check to figure out the issue. Is the code snippet above dependant on some other code I'm not including?

  2. aluminumcans
    Member
    Posted 8 years ago #

    Maybe a better followup question:

    How do I get WP to show errors? As it is now, if it can't execute the include page, it just doesn't do it. It'd be great if I could actually get an error message to point me in the right direction.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags