• Is there anyway to make your home page come up in the list of pages. Or is there a way to format how wp_list_pages outputs the pages, because right now it comes out like:

    < ul >
    < li >< a href=”/somepage/” >somepage< /a >< /li >
    < li >< a href=”/otherpage/” >otherpage< /a >< /li >
    < /ul>

    So ther is no way for me to get say:

    < li >< a href=”index.php” >Home< /a >< /li>

    into that list. How can this be done?

Viewing 3 replies - 1 through 3 (of 3 total)
  • There was a thread on this a while ago but I just can’t find it. I don’t know if what I’ve done was in that thread, but here’s a bit of my sidebar code where I’ve added a link to my homepage:
    <ul>
    <li><a href="#">Home</a></li>
    <?php wp_list_pages('title_li='); ?></ul>

    The important part is that title_li= with nothing after it. From cached Codex: “Displays no heading for list, and list is not wrapped in <li><ul>, </ul></li> tags. (Note the absence of any space after the = sign.)”

    Thread Starter idbehold

    (@idbehold)

    Thanks, that worked.

    Thanks for posting, I was looking for this myself.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_list_pages include index.php’ is closed to new replies.