WordPress.org

Ready to get started?Download WordPress

Forums

How to add link on top nav bar to external site (6 posts)

  1. justmichael
    Member
    Posted 6 years ago #

    I don't really want to add a page, just a link to an external site, that appears in the main nav bar on the top.

    Thanks in advance to anyone who can answer this...

  2. Roy
    Member
    Posted 6 years ago #

    Use your "blogroll" to do that ("manage", "links" in 2.5.1) and put that in your header. This is from my header.php:

    <div id="hmenu">
    <ul>
    	<?php wp_list_pages('title_li=&depth=1') ?> - <?php wp_list_bookmarks('title_li=&categorize=0') ?>
    </ul>

    (see the "wp_list_bookmarks" argument)

  3. justmichael
    Member
    Posted 6 years ago #

    will that replace the existing navigation structure?

  4. Joni
    Member
    Posted 6 years ago #

    This brilliant trick will do exactly what you want.
    http://www.ivovic.net/2008/05/20/turn-a-wordpress-page-into-a-link

    You can see it in action here:
    http://wordpress.mytestbed.com

  5. Ivovic
    Member
    Posted 6 years ago #

    cheers for the plug ;)

  6. justmichael
    Member
    Posted 6 years ago #

    Bingo!

    Sounded cool, didn't work at first. I had saved it as redirect.php using Apple's TextEdit, and it would not allow me to save as .php so i saved as its default .rtf and changed the ending afterwards. No go. So I went into Dreamweaver and did the same thing, saving as redirect.php. Worked fine.

    Thanks you two...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.