Get the latest news, tips and plugin & theme releases...

WordPress Custom Menu Plugin

Posted in Plugins - October 20th, 2009

This is a very simple plugin that I wrote to manage navigation menus from the admin panel in WordPress instead of having to code the template each time a menu or a menu item was added, removed or changed.

Download WordPress Custom Menu Plugin

Menu items are added in the Tools->Custom Menu section of WordPress Admin as displayed below:

Club WordPress Custom Menu Admin

Menu items can be added, edited and deleted here. Use the Visible property to set whether an item is displayed.

To display the Custom Menu in a WordPress theme, add the following code to your template file where you want the menu to be displayed:

<?php custommenu_output(); ?>

For the menu items displayed in the image above, the following HTML will be output in the theme:

<ul>
<li><a href=’/’ title=’Home’>Home</a></li>
<li><a href=’/articles/’ title=’Articles’>Articles</a></li>
<li><a href=’http://wordpress.org/’ title=’Wordpress’>Wordpress</a></li>
<li><a href=’/sitemap/’ title=’Sitemap’>Sitemap</a></li>
<li><a href=’/contact/’ title=’Contact’>Contact</a></li>
<li><a href=’/about/’ title=’About’>About</a></li>
</ul>

The menu is output as an unordered HTML list.

Download WordPress Custom Menu Plugin

All you need to do then is make sure the HTML is styled properly to display the menu correctly. I may do a tutorial on how to do this if there is enough interest, so check out my RSS Feed to keep updated :)

Please let me know what you think of the plugin and what improvements could be made to it.

Read more from this category

Category Listings WordPress Plugin

The Category Listings plugin has been developed for a WordPress site that needed to display the titles and excerpts of the most recent posts for the post that is currently being viewed. The idea being that it promotes other related posts to the readers.

Blogroll to Page WordPress Plugin

You can use the Blogroll to Page WordPress Plugin to output your blogroll links to any page or post on your blog by using its 'blogroll-to-page' custom short code. The output options can be configured using parameters explained in the WordPress Codex and set in the options page which is found under the 'Links' menu.

One Response to “WordPress Custom Menu Plugin”

  1. Kyle Wingate says:

    I need to make the list horizontal. Can you tell me how to do this?

Please leave a comment...