WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Add a link to the homepage in sidebar

[Resolved] Add a link to the homepage in sidebar

  • This must be really simple, but I can’t seem to find how to do it.

    I’ve got a very basic sidebar div right now, merely

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

    I’d like to have a “Home” link in the menu, above the list of pages. How do I do this?

    Thanks very much!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Also, in case it makes a difference, I do plan on altering the current menu so that the link to the page being viewed is a different color than the other links. I’ll need the link to the home page to act in the same manner.

    That color information will be in the CSS, so the link to the home page should read it the same as the other links, but whatever php or wp tags are used to determine what the current page is will have to apply to the home page link as well. (Not sure exactly how the code works for this yet, but I can probably figure that out on my own.)

    Thanks!

    Hi

    Try using this http://codex.wordpress.org/Template_Tags/wp_page_menu
    instead of wp_list_pages – read the instructions closely.

    Brilliant, thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Add a link to the homepage in sidebar’ is closed to new replies.
Skip to toolbar