WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed this tutorial to add a menu item to navigation menu to link to external site:


I copied the snippet of code to my theme's header.php I created a page with the name having the text that I want to appear in the navigation I added a custom field to the page called redirect and placed the link url into the value field.

And then tested and the link never appears in the menu.

share|improve this question
up vote 2 down vote accepted

Are you trying to navigate to an external page or redirect? (Also, bear in mind that was posted almost 3 years ago...in websites and technology in general, that's an eternity!)

You could always just add a custom link to the WordPress menu under Appearance->Menus. Just make sure you add support in the functions.php file.


And here for adding theme support: http://codex.wordpress.org/Navigation_Menus

This is how you would add functional support:

//setup the dynamic navigation
if (function_exists(register_nav_menus)){
                "main_nav" => "Main Navigation Menu"

Then go to the admin panel->Appearance->Menus, and add your external link there.

Then in your template, you would call it like so:

<?php wp_nav_menu(array('menu' => 'Main Nav Menu')); ?>

This is, ofcourse, what you were looking for

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.