Makes use of WP's built in 'Edit Links' to create and manage a website navigation menu that can be displayed using a custom template ta
ezy-nav-menu.php to the /wp-content/plugins/ directoryIf updating plugin please deactivate plugin and reactivate after uploading.
Usage:
In your theme template add the template tag 'show_nav()' at the point where you want the menu to appear (usually in the header template). This will generate the HTML output:
<div id="nav" class="nav">
<a href="{link web address}"
[title="{link description (if specified)}"]
[target="{link target (if specified)}"]
[class="current"(when link matches current page)]>[Link name]</a>
...
...
</div>
Note: for the class="current" to get added to link for current page, you need to have permalinks set so it is not using the default query string type links and you need to enter relative paths starting with / in your links (i.e. drop the http://mysitename.com part).
Additional Usage Options:
show_nav() takes 6 optional parameters:
show_nav($nav_id, $css_class, $before_html, $after_html, $seperator, $display_as_list)
$nav_id - change the id attribute on the outer container (default - 'nav')
$css_class - change the class attribute on the outer container (default - 'nav')
$before_html - add a HTML snippet in front of the link text
$after_html - add a HTML snippet after the link text
$seperator - seperator string placed between links
$display_as_list - boolean value; if set to true, outputs nav menu as unordered list (default - false)
e.g. the following line,
show_nav("nav", "nav", "<div>", "</div>", true);
would generate output such as the following:
<ul id="nav" class="nav">
<li><a href="link_url1"><div>Link Text 1</div></a></li>
<li><a href="link_url2" class="current"><div>Link Text 2</div></a></li>
...
...
</ul>
Requires: 2.1 or higher
Compatible up to: 3.0.5
Last Updated: 2009-8-21
Downloads: 5,453
Got something to say? Need help?