• I have a problem where I cannot get the page list function to work correctly. It works on my local setup but when I put it live it either fails silently on the parent page, and then on child pages it gives me this error:

    Warning: Invalid argument supplied for foreach() in /home/path_to_site/wp-includes/template-functions-post.php on line 368

    Array
    (
    [depth] => 0
    [show_date] =>
    [child_of] => 0
    [title_li] => Pages
    )

    Array
    (
    [8] => Array
    (
    [title] =>
    [name] => privacy
    )

    [7] => Array
    (
    [children] => Array
    (
    [0] => 8
    )

    )

    )

    I am stumped by this – like I said it works fine running locally.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter monkeynotes

    (@monkeynotes)

    It appears that wp_list_pages does not like being requested after things like:

    <?php the_title(); ?>
    <?php the_content(); ?>

    Have been processed. If I take them out of the page it goes through just fine. This is really odd.

    I have a similar problem. when I put child_of=# in the wp_list_pages, I get that error on line 368. Also, the sort_column option simply does not work for me. Other options have worded.

    For me, wp_list_pages is fine after ?php the_content(), it is just the child_of that causes a bug.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘V1.5 wp_list_pages problem’ is closed to new replies.