Wordpress : Adding custom links to Menu

avi

Skilled
Guys how to add custom links [links to external sites, pages] in Wordpress menu ? Currently I am on 3.2.1 and using default twenty eleven theme.

screenshot :

IwQts.jpg
 
Find this
Code:
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
In header.php and add this
Code:
[url="your site address"]What you want it to show to user[/url]
just after the above code
 
It does not work like the other menu items because the wp_nav_menu automatically creates a list with links and class , id names. It is not possible to add a custom link to the list.
 
Thanks man :)

In earlier versions there was a plugin which did the job, this new version is much complicated :-/
 
<div class=menu ><div class="page_item page-item-50"><ul>[*]<a href=techmax.co.in>Techmax</a>[/list]</div></div> Try this code it works replace the things
 
Manually adding code to the theme will not help. The next time the theme or wordpress itself is updated, all your changes will disappear. Because with wordpress, Twenty ten and twenty eleven themes will be automatically updated (this is where child themes come into picture). The way to do it is, go to Appearance > Menu > Custom(create your link here) and add it to the menu on the right side. Now on the right side, you can drag and drop them to arrange in the order you like. Click save and you have it.
 
Twenty ten &eleven both support only one menu item. So we have to sacrifice another link to get the custom link. By adding code we can add as many we want.
 
@dreamcather - what challapradyumna saying is correct, this new version is complicated & only single menu supported
 
Just did a wordpress local install and they seem to have limited the menu links to two. You can create the menu in the menu creator but it does not show up. I suggest you use a different theme, or adding code to the theme after every update is the only way.
 
Updating is not needed until 4.0 there we can see some revolutionary changes. But now only some security bugs will be fixed mostly.

--- Updated Post - Automerged ---

@avi I just noticed that your forum has tabs for categories. It took me some time to realise that and most of the other readers too. I suggest you change that to a list style like in TE.
 
Back
Top