wp_list_pages stops page processing (3 posts)

  1. Steve Taylor
    Posted 9 years ago #


    I've found the apparent cause of a problem I've been having that resulted in certain pages coming back with no XHTML after the "Edit page" link.

    It seems that the problem is in my sidebar code, which is just after where this link is output:

    global $df_section, $df_section_id;
    if ($df_section!="home") {
    if ($df_section_id && array_search($df_section, array("essays","interviews","reviews","contact"))===false) {
    echo "<ul id=\"subnav\">\n";
    $params = "child_of=".$df_section_id."&depth=1&title_li=";
    echo "\n";

    The vars prefixed "df_" are my own that I use for stuff I've not found out how to do in WP. I've output them on the problem pages and they're being set the expected values (the name of the current top-level site section in the URL scheme, and its ID, respectively).

    If I comment out the above subnav code, the pages come back fine. With the code in:


    You'll see in the source that the last bit of code is the start of the subnav list.

    One page comes back completely blank:


    Again, all is fine without the subnav code.

    Does anyone know of a bug with wp_list_pages() that might cause this? I can't find anything. I noticed both problem pages are second-level in the navigation, but most second-level ones are fine, e.g.


    Any help appreciated!

  2. Steve Taylor
    Posted 9 years ago #

    By the way, this problem started happening - apparently without cause - when I was using WP 2.0. I just upgraded to 2.0.5, hoping it would fix things, but it just changed the problem slightly (before even the "Edit this page" link at the end of the content wasn't being output, and no pages were coming back blank!).

  3. Steve Taylor
    Posted 9 years ago #

    OK, to anyone who comes across this thread with the same problem... No solutions forthcoming, so I just wrote my own PHP code to output the subnav instead of using wp_list_pages.

Topic Closed

This topic has been closed to new replies.

About this Topic