Add external links in WordPress navigation
Dear Christina,
Is there a way to connect a WordPress blog to a WordPress website? I’d like to create a blog tab on the website which when clicked on will open up a WP blog which has a separate domain.
Thank you.
Janine -Your Virtual Wizard
Dear Janine,
There are actually two ways to add external links to your WordPress sites navigation.
The easy way is to install the plugin PageLinksTo. I have not personally used this plugin but I have seen good reviews on it.
Please use with caution and backup everything first.
My preferred way is manually. It involves jumping into the code of your theme but it’s painless, I promise.
First you’ll need to go into Appearance->Editor and then click on header.php (this is the usual place for the code but you may have a separate file named nav.php, in that case you’ll be opening it instead)
You are looking for something like this: <?php wp_list_pages( ); ?>
Let me point out that some themes choose to list categories in the navigation instead of pages- if that is what your theme does you’ll be looking for <?php wp_list_categories( ); ?>
Now to add your external link you’ll add the following directly under that code:
<li><a href=”http://yourdomain.com“>External link name</a></li>
If you have more than one external link to add you’d just add another line like the one above. remember, the links you add will show at the end of your navigation bar.
So your final code will look like:
<?php wp_list_pages(‘title_li=’); ?> (or <?php wp_list_categories( ); ?>)
<li><a href=”http://yourdomain.com“>External link name 1</a></li>
<li><a href=”http://yourdomain.com“>External link name 2</a></li>
Be sure to save all changes and refresh your WordPress site to see your handiwork.
~Christina
![]()

Great information…it worked! I’m linked!
Another related question…other than linking a blog to a website tab, what other uses would adding an external link offer?
Janine
Other reasons for external linking:
-you have three companies and want to give visitors access to all easily.
-maybe you want a link to your flickr account
-you could have a survey you want to link to for an extended period of time
Thank you, Christina! I searched for this everywhere and couldn’t find which code to change. Your instructions are very clear and helpful.
Sue Boedeker
I tried doing this manually but it didn’t work. The theme I’m using is configured quite cryptically. I did, however, download the PageLinksTo plugin and it works like a charm!
Thank you so much for the information. I’ve been trying to figure out how to do this for a year!
For whatever reason, doing this manually is not working :/ …. frustrating!
Ok it totally worked! I just had to wait while processed after refreshing, it takes awhile to show new changes! Yay! lol THANKS CHRISTINA!
Glad it worked for you Tee
~C
thank you for this information. the Page Links To plug-in works beautifully! I can now use my .com WordPress site as a CMS and link to my external blog from the navigation menu.
thank you for this information. the Page Links To plug-in works beautifully! I can now use my .com WordPress site as a CMS and link to my external blog from the navigation menu.
How do you do this so the external link appears as a child of a particular category?
Thanks for asking this.
You can make any page point to an external link using PageLinksTo.
When adding a new page/post, name it what you want and then in the right side area of the text editor page you'll find a drop-down box called “Parent”. Choose the page you want the link to be a child of and then scroll down to set the URL you want it to point to (in pagelinksto area) ,save/publish.
If you mean you have categories as your main navigation and you want to make a child category point to an external URL- I don't know of a plugin for that at this time. That is something you may need to have hardcoded into your theme.
~C