WordPress.org

Ready to get started?Download WordPress

Forums

How to add friend's site to my wordpress nav bar/page? (5 posts)

  1. ipunkbali
    Member
    Posted 4 years ago #

    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>

  2. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    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>
  3. ipunkbali
    Member
    Posted 4 years ago #

    thanks alot.

  4. naweedshams
    Member
    Posted 4 years ago #

    Or get the "Link to" plugin, it's easier.

  5. @mercime
    Volunteer Moderator
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.