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: « 2315 14 13 12 11 [10] 9 8 7 6 51 »

  • 100. Josh  |  February 25th, 2007 at 12:05 am

    Hi. I’m having the same sort of error as comments #98 and 99 when I try to create a menu item. Any ideas? Thanks.

  • 99. Kurt  |  February 23rd, 2007 at 3:53 pm

    I had to manual create the table as instructed above. That seemed to work, but now when I try to create my fist menu I get this error: Any ideas?

    WordPress database error: [Unknown column ‘class’ in ‘field list’]
    INSERT INTO `wp_stickymenu` (`name`, `link`, `menu`, `class`, `weight`, `disabled`) VALUES(’Test’, ‘http://www.adobeasw.com/mission/’, ‘Main’, ”, 0, 0);

  • 98. Julie Bonner  |  February 21st, 2007 at 9:14 pm

    I am having problems with the sticky menu under my header. When I try to create one under “Manage” I get this message:

    WordPress database error: [Unknown column ‘class’ in ‘field list’]
    INSERT INTO `wp_stickymenu` (`name`, `link`, `menu`, `class`, `weight`, `disabled`) VALUES(’Home’, ‘/’, ‘Main’, ”, 1, 0);

    Any help would be greatly appreciated!

  • 97. Lisa  |  February 17th, 2007 at 11:24 pm

    Isis Kali (nice name by the way!) - I just moments ago figured this out for myself and am happy to share because I was equally confused.

    You need to go to your control panel (accessed through your web host), look for a tab called “phpMyAdmin” - mine was under the “Databases” category.

    Click “phpMyAdmin” link
    Click “databases” link
    Click SQL tab
    Should open up a box “Run SQL query/queries on server localhost: Documentation”
    Paste the code below into the box:
    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′,
    `disabled` TINYINT NOT NULL DEFAULT ‘0′,
    PRIMARY KEY (`id`)
    ) TYPE = MYISAM;”

    Click “go”
    and you should be good to go from here - at least I was, I’m using BlueHost so can’t say if it’s exactly the same for other hosts.

    Good luck!

    WordPress Support had this topic that helped me a bit http://wordpress.org/support/topic/45606?replies=5

    Lisa

  • 96. Isis Kali  |  February 13th, 2007 at 2:39 am

    “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):

    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′,
    `disabled` TINYINT NOT NULL DEFAULT ‘0′,
    PRIMARY KEY (`id`)
    ) TYPE = MYISAM;”

    …could you put this in plain English, please? I’m getting the same error, and I have no clue where this would even go : )

  • 95. Mitos Kalandiel  |  January 31st, 2007 at 4:58 pm

    Heya ericdes,

    I was missing one feature in StickyMenu (which is a brilliant plugin, just btw ;))
    I missed the option to enter a “target” to each link (like _blank), and so was editing the source of SM, but at one point messed it up.

    Well I was able to include all needed menu entries for the admin, and also changed the “core” of the SM (the actual function, which displays the html code to the page) but for some reasons, the entries when I put them in the admin page, get not saved to the database, and after starring two hours on the source, still not finding the error, i was wondering, if there is a possibilty to mail your the changed source, that you can have a look at it, tell me what I’ve done wrong, and maybe this change also makes it into the 1.2 of SM ;)

    You can see the plugin in action on my Homepage (provided it while putting in commenter details)

    Kudos to you for making such a nice and useful plugin :D

  • 94. Carballada » Nuevas&hellip  |  January 29th, 2007 at 5:22 pm

    […] Bueno, inspirado por la aparente falta de simplicidad de este blog he añadido una barra de menú en la parte superior para facilitar la navegación y el acceso a las partes más importantes. Ha sido gracias a la inclusión del plugin Sticky Menu que permite realizar menús con menos opciones, eso y una currada en css para hacer los botoncillos. En otro orden de cosas acabamos de superar las 10.000 visitas, no es nada, pero a mí me parece un montón y me hace ilu, que le vamos a hacer. Publicado por Jose en Esta web | Visto 85 veces. Etiquetas: plugin, wordpress Compártelo (No ha votado nadie este post todavía, que te parece? vota pofavó! + info)  Loading … otros post posiblemente relacionados […]

  • 93. Soul of Adoption » &hellip  |  January 24th, 2007 at 10:55 am

    […] Role Manager Plugin Sticky Menu  Plugin Site Unavailable Plugin […]

  • 92. angel  |  January 20th, 2007 at 1:39 am

    hi, im a newbie on wp and have tried to install the plugin. and when I read the Manage / Sticky portion, this is what I get :

    Not Found

    The requested URL /wp-admin/stickymenu/admin.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I have tried deactivating and activating and also reinstall the plugin but nothing seems to work. Any advice?

  • 91. ericdes  |  January 12th, 2007 at 11:37 am

    KirbyG,

    Thank you for pointing out the ‘webserver root’ vs. the ‘wordpress root’ problem. It didn’t occur to me when I programmed the sticky menu plugin.

    I’m working on version 1.2 and I’m reluctant to make a modification that could create many problems to those who have already installed it. I guess I’ll leave it that way unless more users request that change.

Pages: « 2315 14 13 12 11 [10] 9 8 7 6 51 »

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