Support » Themes and Templates » Static Homepage link

  • I searched and found other topics about this but they were all closed. My question is how do I add a static “home” link that points to the root of my domain under the “pages” links on my site.

    on a realted thought, I see a lot of sites with their “pages” links accross the top of the header running horizontally instead of vertically in the sidebar, how is this done? Seems the word “pages” is taken out completely.

    Is it all just hardcoded?

Viewing 1 replies (of 1 total)
  • For example:
    <li><a href="#">Home</a></li>
    <?php wp_list_pages('title_li='); ?>

    The important part is that title_li= with nothing after it. From 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.)” That is, the page links will be in <li></li> tags so you can add more of those before and after the template tag. That is why you also need to add the <ul></ul> tags.

    Naturally, if you already have title_li or other parametres in the tag you need to either change title_li to nothing or add it in the parametre list as &title_li= (there are examples on the Codex page I linked to).

    As to your other question, see Creating Horizontal Menus at the Codex.

Viewing 1 replies (of 1 total)
  • The topic ‘Static Homepage link’ is closed to new replies.