WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] trying to add external links to navbar (3 posts)

  1. nharding99
    Member
    Posted 3 years ago #

    Hello,

    My first WP site is going quite well, I have adapted the mahusay theme. One thing I'm trying to do is to hardcode some menu options in the main navbar so that this integrates with the rest of the non WP pages.

    I have found the code section that looks like it will do the trick, in a file called header.php I have added some list items intended to link to "Home", "About Us" etc:

    <div id="navmenu">
    				<ul>
                        <li><a href="http://www.amodeowebdesign.co.uk">Home&nbsp;&nbsp;</a></li>
                        <li><a href="http://www.amodeowebdesign.co.uk/aboutus.html">&nbsp;&nbsp;About Us&nbsp;&nbsp;</a></li>
                        <li><a href="http://www.amodeowebdesign.co.uk/portfolio.html">&nbsp;&nbsp;Portfolio&nbsp;&nbsp;</a></li>
    					<li<?php echo (is_home() ? ' class="current_page_item"': '')?>><a href="<?php echo get_option('home'); ?>/"><span><span>Blog</span></span></a></li>
                        <li><a href="http://www.amodeowebdesign.co.uk/testimonials.html">&nbsp;&nbsp;Testimonials&nbsp;&nbsp;</a></li>
                        <li><a href="http://www.amodeowebdesign.co.uk/contact.html">&nbsp;&nbsp;Contact Us&nbsp;&nbsp;</a></li>
                        <?php themefunction_list_pages(); ?>
    				</ul>
    			</div>

    I'm expecting those external hrefs to work but they silently fail and when I hover over them they show up as links to the current blog home page, the current page, i.e. http://www.amodeowebdesign.co.uk/blog/ rather than e.g. http://www.amodeowebdesign.co.uk for my main home page.

    Is there a way to make this work?

    Blogsite is at: http://www.amodeowebdesign.co.uk/blog/

    Thanks in advance for any advice
    Nigel

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    You might want to have a look at the Page Links To plugin: http://wordpress.org/extend/plugins/page-links-to/

  3. nharding99
    Member
    Posted 3 years ago #

    Thanks, I have sorted it out now

Topic Closed

This topic has been closed to new replies.

About this Topic