where is the code to display page list? (3 posts)

  1. meganlee1984
    Posted 5 years ago #

    I'm trying to make a dynamic menu so I need to edit some of the code, but I don't know where to locate it.

    I'm looking for this code:

      $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
      $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
      if ($children) { ?>
      <?php echo $children; ?>
      <?php } ?>
  2. Curtiss Grymala
    Posted 5 years ago #

    If that code exists at all, it will be inside of the theme files for the theme you're currently using. However, not all themes necessarily have that code, so you might not find it. Those that do will all have that code in different places (and it might not look exactly like that).

    Where on your site does the list of pages actually appear? If it's across the top of the screen, then you'd probably find the code in the header.php file (though not definite); if it appears on the side of the screen, it could be in sidebar.php or index.php. It might even be in multiple files, depending on how the theme is set up.

    Good luck.

  3. meganlee1984
    Posted 5 years ago #

    First off, thanks for your response.

    Second, the code is in the sidebar, but its pulled in from a widget so I believe that its defined in the header.

Topic Closed

This topic has been closed to new replies.

About this Topic