WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Add a link to the homepage in sidebar (4 posts)

  1. xith
    Member
    Posted 5 years ago #

    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!

  2. xith
    Member
    Posted 5 years ago #

    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!

  3. stvwlf
    Member
    Posted 5 years ago #

    Hi

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

  4. xith
    Member
    Posted 5 years ago #

    Brilliant, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic