Support » Fixing WordPress » more (wp_list_pages) tags in one file

  • I would like to have two independent page-lists in sidebar, is it possible? When I try to make it in this way:

    <?php wp_list_pages('child_of=43'); ?>


    <?php wp_list_pages('exclude=43'); ?>

    I get this error message instead of second page-list:
    Warning: Invalid argument supplied for foreach() in …/wp-includes/template-functions-post.php on line 368

Viewing 2 replies - 1 through 2 (of 2 total)
  • Taking a shot at this–try:

    <?php wp_list_pages('exclude=43&'); ?>

    Same result… It seems you always get result for parametres from tag #1 for every usage of wp_list_pages in one file.

    If you try:

    <?php wp_list_pages('exclude=1'); ?>
    <?php wp_list_pages('exclude=2'); ?>

    there will be page ID=1 missing in both list-pages (with page ID2 displayed). So I would like to know, if it’s bug or intention:)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘more (wp_list_pages) tags in one file’ is closed to new replies.