Support » Fixing WordPress » Where is “wp_list_pages()” defined?

  • Hello!

    there is this line of code in my sidebar:

    <?php wp_list_pages(); ?>

    This is doing a fine job displaying my menu, except that it is inserting the word “Pages” above the menu. I want to get rid of the word “Pages” that is automatically inserted.

    I found I can change the word from “Pages” to something else by using this format:

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

    But when I remove the title_li definition, it goes to the default “Pages”.

    I tried making it invisible like this:

    <?php wp_list_pages(‘title_li=<font color=”white”>Menu</font>’); ?>

    This almost works, but there is a bullet next to the invisible text, which I don’t want.

    Somewhere the wp_list_pages function has to be defined, where it is inserting “Pages” as the default, putting the LI tags around it, and defining the style of the li tag.

    I’ve looked all over my stylesheet and can’t find anything that helps.

    Does anyone know where I might be able to find where the wp_list_pages is defined, so I can remove the “Pages” at the top of the menu listing, and also the LI tag that is forcing the bullet?

    Please let me know….

    gary in vermont

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator keesiemeijer


    The following example displays no heading text above the list.

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

    thanks, but I tried that and the result is… it did remove the heading text, but now all the top level menu items are bulleted and the 2nd level menu items are not bulleted but they have extra spacing around them. this is worse than before.

    I just want a simple menu with the 2nd level items indented under the top level items.

    Here are a couple screenshots to see what happened:


    Then I put in your code and got this:

    Any other ideas?

    oops, the “before” link should be:

    BTW, is there any way to edit a post on this forum once it’s posted?



    Forum Moderator

    is there any way to edit a post on this forum once it’s posted?

    You should be able to access an Edit link to amend your post for about 10 mins after its posted.

    With regard to page list issues, you need to address the bullets and unwanted spaces using your theme’s stylesheet.



    Forum Moderator

    try to read and fully understand this paragraph:

    to keep the same order of ul/li etc for the styling with css when you change to no title, you could try and use:

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

    instead of your original:

    <?php wp_list_pages(); ?>

    ( in a correct code, this would have been wrapped in <ul> tags, which you need to keep )

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Where is “wp_list_pages()” defined?’ is closed to new replies.