Add Wordpress Menu Description

So I have been thinking about a blog redesign for a little while. I am not really happy with the current design so I have been keeping my eye on things that I like and how I can incorporate it into my design.

One of the things that has been catching my eye was the descriptive text in the Wordpress menus of some sites. Some examples can be see in WooThemes in both the free BlogTheme and the commercial offering f0101 & Busy Bee. I also noticed Grid Focus a free Wordpress theme that has the effect that I was looking for. The biggest thing that I noticed was they rewrote the wp_page_menu() function. Some of them rewrote the dynamic classes but missed a few(WooThemes). I knew there had to be a better way so I kept searching. I ran across ThemeShaper and the post WordPress Menu Tricks and it looks like John Kristian took this a giant step further to include options to add categories and drop down menus and more flexibility with his post A Smarter Menu for WordPress BUT these solutions required an additional function to be added to the Wordpress template.

I knew there had to be a simpler way. Since we are using php in Wordpress why can’t I rewrite the code as it is being generated by wp_page_menu()? There is a PHP function for just this called str_replace() that seemed like it would do exactly what I was looking for. Since I am not a programmer the next step was to look for aWordpress plug-in that used this function in some way. Just to get a hint as to how to do it. My searching came to Page Lists Plus a very well written plug-in that comes VERY close to what I wanted to so. You can read the description below.

Adds customization options to the wp_list_pages function which is used to create Page menus. Change the link text and title attributes, redirect, nofollow or unlink links, and remove links from page lists altogether, all through the WordPress dashboard.

So I hacked it ;-) and now I would like to make it available in a stripped down form.

This little plug-in will add a text field under your post, this is where you would add in your menu description text. 

If all goes well this should be your result. 

You must log in to access this file.
To download this file you must right click and select Save As

Log in

Download: Add Wordpress Menu Description (42)

To install this plug-in simply unzip the down loadable file into your plug-ins directory and activate

I would love to hear comments.

Post to Twitter Tweet This Post

{ 1 trackback }

Tweets that mention Add Wordpress Menu Description | The Template Blog -- Topsy.com
November 24, 2009 at 1:23 pm

{ 7 comments… read them below or add one }

bonestructure November 28, 2009 at 11:37 pm

This is exactly what I’ve been searching hours for today.
I installed it, it added the text BUT it also returned a couple of warnings related to files in the WP core. I would include a link here to show you but I had to un-install this on a live site. Any incite on the following warnings?

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘page_exclusions’ was given in /home/content/97/5106297/html/wp-includes/plugin.php on line 166

Warning: implode() [function.implode]: Invalid arguments passed in /home/content/97/5106297/html/wp-includes/post-template.php on line 761

Thanks!
dbone

David December 3, 2009 at 8:57 am

Hello

It looks like it may be conflicting with another plug-in. Try deactivating your other plug-ins to see if the error goes away.

Dave

wizeazz December 8, 2009 at 4:42 pm

Thanks.
will give a try in combination with pixopoint.

jetonr December 19, 2009 at 5:13 pm

Hi there,
I really like this is idea is much easier than other plugins and it allows current_page_item right? Meaning i can add css to active menu.
I wanna download it but the link is not working ????

miracleman12 December 28, 2009 at 11:59 am

Thank you for this. What I did was take the code that you wrote (or some of it) and reintroduced it to Page List Plus because I need some of the other functions of Page List Plus. The two combined was exactly what I needed. Thank you for pointing me in the right direction!

David January 3, 2010 at 9:51 pm

@miracleman12
Your very welcome and thank you for your kind words. I actually did the same thing and have the complete plugin but I wanted some feedback from the original author before I offered it to the public.

Dave

mtjader January 16, 2010 at 2:23 pm

I think some of the problems that people are complaining about stem from at the top of the plugin line 39
add_filter( ‘ wp_list_pages_excludes ‘ , ‘ page_exclusions ‘ ); this page _exclusion is not in your plugin

Thanks for all of your work