Support » Fixing WordPress » wp_list_pages() Problem!

  • Howdy,

    I’ve got a problem that hopefully can be solved pretty easily!

    Essentially, the WordPress codex states for the “wp_list_pages()” tag that

    By default, wp_list_pages() generates a nested, unordered list of WordPress Pages created with the Write > Page admin panel. You can remove the outermost item (li.pagenav) and list (ul) by setting the title_li parameter to an empty string.

    I would like to have an empty string for the title, but keep the ul, li, etc styling (default styling if I did have a title)

    Is this possible?


Viewing 1 replies (of 1 total)
  • To create a list of pages using the wp_list_pages() tag without having a title on there just use the following code:

    <?php wp_list_pages('title_li='); ?>

    That will remove the title from the list but keep the <ul> with <li> tags for each pages nested inside.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_list_pages() Problem!’ is closed to new replies.