Sticky Menu, a plugin for WordPress
July 6th, 2007 ericdes
I wrote this little plugin to easily create menus in WordPress.
Normal use of WordPress to create menus:
Because WordPress normally creates menus automatically, for example from a list of categories or pages, you have to exclude manually all items you don’t want in your menu, which can be a lengthy process if you have a lot of categories or pages.
Also, you can’t mix categories and pages in a same menu. You can’t put a link to a subdomain, which could be the case if you have a forum running outside WordPress for example.
What Sticky Menu improves:
Sticky Menu lets you define an unlimited number of menus, in which
you list the exact number of menu items you want to appear. Menu items can link to any pages, posts, etc., in your site or any URLs exterior to your site. You can define a class name for each menu item.
With Sticky Menu being activated, you go to the admin board and look for Sticky Menu in the ‘Manage’ section. There, you create as many menus and menu items as you’d like. In this example, I created a menu named ‘Main’ with 4 menu items: Home, Fun, About me, Contact me.
![]()
Then I edited the template files header.php, footer.php, sidebar.php to add these lines:
$menu = new stickymenu;
$menu->display_menu('menu=Main'); # Will display menu 'Main' here
(Please note that the names are case-sensitive, e.g. ‘Main’ is different than ‘main’.)
5/21/2008: Sticky Menu 1.41 - Fixed type bug related to ‘class’ field.
Download links to the Sticky Menu plugin:
Sticky Menu Download Area (History)
Entry Filed under: WordPress plugins


218 Comments Add your own
Pages: « 22 … 11 10 9 8 7 6 5 4 3 2 [1]
10. codecottage | May 8th, 2006 at 6:45 am
I am still so new to WP that it didn’t occur to me that this is what PERMALINKS are for! My apologies for my post. I used permalinks with your plugin on my menus and everything works great. Thanks again.
9. codecottage | May 8th, 2006 at 5:47 am
How do I create links to the pages I’ve created inside of WP? As a programmer, I can use the id and call the page using php but I want my client to be able to create a page inside of WP and then link to it using Sticky Menus. Is this possible?
Thanks!
8. codecottage | May 8th, 2006 at 5:01 am
Great plugin. Thank you! I was able to wrap my own menu design around your code. (css styled unordered list.) I will be able to train my client to modify her own menus. This is great! Keep up the good work. Your site is very attractive.
7. ericdes | May 5th, 2006 at 2:03 pm
Try to wrap the foreach() loop this way:
if ($menu_list_array) { foreach($menu_list_array as $this_menu) { if ($this_menu['menu']) { $menu_list[$menu_count] = $this_menu['menu']; $menu_count = $menu_count + 1; }; }; };6. billhector | May 5th, 2006 at 1:06 pm
FYI: I get the following error on the admin page:
Warning: Invalid argument supplied for foreach() in wp-content/plugins/stickymenu/admin.php on line 555. ericdes | May 4th, 2006 at 10:36 pm
I don’t think it’s possible as it is now. I’ll try to add this feature in the next release.
4. Rick Leonard | May 4th, 2006 at 8:05 pm
Very nice. How would I go about intenting portions of the menu to give it a tree-like appearance? For example, making sort order #2 a “child” of #1?
3. TemplateXtreme Sample &ra&hellip | April 28th, 2006 at 6:53 pm
[…] In the “Plugins” panel check that the stickymenu plugin is installed and activated. In case, it’s not, if “Sticky Menu” is listed in the plugin list, simply click “activate”. If it’s not listed, locate the folder stickymenu in: wp-content/plugins/ and upload this folder to your server in the plugin directory: wp-content/plugins/. Then go back to the admin panel > Plugins and activate it. If you can not find the plugin, go to tela-web.com to download it. Upload it to your server in the plugin directory: wp-content/plugins/. Then go back to the admin panel > Plugins and activate it. […]
2. ericdes | April 25th, 2006 at 2:12 pm
Normally the table (prefix)stickymenu is created when you activate the plugin. You should try to des-activate and re-activate and see if you get any error messages there.
Alternatively, you can create manually the table (prefix)stickymenu (wp_stickymenu in this example) with this SQL command (via phpmyadmin for example):
1. PurpleRain | April 25th, 2006 at 7:15 am
I found this kind of problem:
WordPress database error: [Table ‘googlep_wordpress.wp_stickymenu’ doesn’t exist]
SELECT DISTINCT menu FROM `wp_stickymenu`
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘)’ at line 1]
UPDATE `wp_stickymenu` SET `disabled` = 0 WHERE id IN ()
How should I create the table?
Pages: « 22 … 11 10 9 8 7 6 5 4 3 2 [1]
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed