WordPress.org

Support

Support » How-To and Troubleshooting » How to add friend’s site to my wordpress nav bar/page?

How to add friend’s site to my wordpress nav bar/page?

  • i want to add my friend’s site link on my header nav bar, but i confuse, I dont even see my own pages in my code but the code wp_list_pages.

    How to achieve this, Thanks!

    this is my nav bar code:

    <div class=”span-24″>
    <div style=”margin-top:2px;”>
    <ul id=”nav”>
    <li <?php if(is_home()) { echo ‘ class=”current-cat” ‘; } ?>>“>Home

    <?php wp_list_pages (‘exclude=991&depth=1&orderby=name&order=ASC&title_li=’); ?>

    </div>
    </div>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Add the link to your friend’s URL before or after wp_list_pages like so:

    <div class="span-24">
    <div style="margin-top:2px;">
    <ul id="nav">
    <li <?php if(is_home()) { echo ' class="current-cat" '; } ?>>">Home
    <?php wp_list_pages ('exclude=991&depth=1&orderby=name&order=ASC&title_li='); ?>
    
    <li><a href="http://yourfriendsite.com/" alt="My friend's Site">Special Site</a></li>
    
    </div>
    </div>

    thanks alot.

    Or get the “Link to” plugin, it’s easier.

    @naweedshams – actually adding one line of code is easier than installing a plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add friend’s site to my wordpress nav bar/page?’ is closed to new replies.
Skip to toolbar