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.

Sticky Menu's screenshot - Click to enlarge
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

Sticky Menu - See the result!

(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 1.41 (tar.gz)

Sticky Menu 1.41 (.zip)


Sticky Menu Download Area (History)

Entry Filed under: WordPress plugins

230 Comments Add your own

Pages: « 2311 10 9 8 7 6 5 4 3 [2] 1 »

  • 20. EncGuano  |  May 24th, 2006 at 12:18 pm

    Hi again!

    Thanks fo your new release and for the work required.

    Before installing I deactivated the two Sticky Menu entries from the plugin list, deleted the stickymenu-folder from /wp-content/plugins and deleted the Sticky Menu entries from my database.

    When I installed the new version (1.1) and activated it in the plugin (it only shows one plugin now :-)) I get following error:

    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 ‘TINYINT NOT NULL DEFAULT ‘0′, PRIMARY KEY (`id`) ) TYPE = MYISA]
    CREATE TABLE wp_stickymenu ( `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(55) NOT NULL, `link` VARCHAR(255) NOT NULL, `menu` VARCHAR(55) NOT NULL, `weight` int(11) NOT NULL DEFAULT ‘0′, TINYINT NOT NULL DEFAULT ‘0′, PRIMARY KEY (`id`) ) TYPE = MYISAM;

    When I go to Manage–>Stickymenu, I get

    WordPress database error: [Table ‘usr_weba13_1.wp_stickymenu’ doesn’t exist]
    SELECT DISTINCT menu FROM `wp_stickymenu`

    Any ideas?

    Greets,
    EncGuano

  • 19. ericdes  |  May 23rd, 2006 at 10:13 pm

    I just released the new version 1.1 of Sticky Menu, which corrects all the bugs previously listed. Thank you for all your feedbacks which improve the quality of this work.

  • 18. EncGuano  |  May 23rd, 2006 at 8:31 pm

    Well… after activating the second item the admin.php-output was placed above the horizontal menus in the admin section… I could deactivate it, although it gave me an error.

    After this I created a menu with stickymenu. when I tried to add a new menu item after that, I got:

    Warning: implode(): Bad arguments. in /var/www/weba13/html/gaiadelic/wp-content/plugins/stickymenu/admin.php on line 42

    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]
    SELECT * FROM `wp_stickymenu` WHERE id IN ()

    Could you help me on this?

    Greetings,
    henning

  • 17. EncGuano  |  May 23rd, 2006 at 1:42 am

    Alright, thanks for your help! :)

  • 16. ericdes  |  May 22nd, 2006 at 11:12 pm

    Alrightly: Leave it all the way it is, both items should remain active. It shouldn’t cause any trouble.

  • 15. EncGuano  |  May 22nd, 2006 at 10:21 pm

    Alrighty :)

    So I should only activate the entry for stickymenu.php and leave the entry connected to admin.php alone?

    Just asking since I´m new to WordPress and I don´t want to mess anything up… ;)

    Greets,
    Enc

  • 14. ericdes  |  May 22nd, 2006 at 9:38 pm

    I may have put 2 different headers in stickymenu.php and admin.php. It’ll be corrected in the next release. It shouldn’t create any other problem than the one you mentioned, otherwise please let me know.

  • 13. EncGuano  |  May 22nd, 2006 at 9:24 pm

    Hi ericdes!

    One question: Whenever I move the folder “stickymenu” (containing admin.php, stickymenu.php and readme.txt) in the directory “/wp-content/plugins/” I get two entries in the plugin list:

    1) “Sticky Menu - 1.0 - Create menus easily that link to internal content or external urls. By ericdes .”

    2) “Sticky Menu 1.0 - By .”

    Is this something to worry about?

    The first one links to /plugins/stickymenu/stickymenu.php, the second one to /plugin/stickymenu/admin.php.

    What did I do wrong?

  • 12. martinridgway.com »&hellip  |  May 15th, 2006 at 10:33 pm

    […] Sticky Menu […]

  • 11. dave  |  May 9th, 2006 at 6:22 am

    I noticed that this error comes up when there are no menu(s) yet made. Is there away around this until one does put in the menu items?

    Warning: Invalid argument supplied for foreach() in …\plugins\stickymenu\stickymenu.php on line 69

    I do have the following in my header.php:

    display_menu('menu=main'); # To display menu 'main'

    I also noticed that when I disable menu items, they still show up..?

    Thanks for the plugin and any help would be much appreciated!

Pages: « 2311 10 9 8 7 6 5 4 3 [2] 1 »

Leave a Comment

Required

Required, hidden

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