Support » Fixing WordPress » wp_list_pages stops page processing

  • Hi,

    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:

    Volume One

    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:

    About Gyrus

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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!).

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_list_pages stops page processing’ is closed to new replies.