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

  1. xith
    Posted 7 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

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

    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
    Posted 7 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.)


  3. stvwlf
    Posted 7 years ago #


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

  4. xith
    Posted 7 years ago #

    Brilliant, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic