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

218 Comments Add your own

Pages: « 2220 19 18 17 16 [15] 14 13 12 11 101 »

  • 150. 0816″ » Blog &hellip  |  May 14th, 2007 at 2:02 pm

    […] 好東西呀~~~~  原來是它呀(stickymenu)←外掛 給我找到也,之前沒有它,那些漂漂免費的面版套用時,都會出現錯誤訊息 […]

  • 149. tela  |  May 13th, 2007 at 5:01 pm

    Ok Ivan. Cool!

    Now I recommend you have a look at this page.

    That should help you.

  • 148. Ivan  |  May 13th, 2007 at 12:56 am

    … php tags! :D

    Now its ok… but is vertical… :(

  • 147. Ivan  |  May 13th, 2007 at 12:55 am

    Ok ok now i understand… I didnt underrstand that we must add

  • 146. tela  |  May 11th, 2007 at 10:04 pm

    Hi Ivan,
    I just went back to the instruction eric gave for the installation. And it looks like there is slight difference with your code. If we follow the instructions your code should be:

    $menu = new stickymenu;
    $menu->display_menu('menu=pannello');

    Maybe you could try this?

  • 145. Ivan  |  May 11th, 2007 at 1:19 pm

    Uff… I see the same think that u see! Why? In my header.php i putted the right thing! Why if we see source code the name ‘pannello’ it doesent appear… :(

  • 144. Ivan  |  May 11th, 2007 at 1:11 pm

    1) yes
    2) Yes… My menu is composed from the pages “1″, “2″, “3″
    3) 1.1 Yes…

    Now i retry to do all! ;)

  • 143. tela  |  May 11th, 2007 at 12:08 am

    Ok. Ivan, now I can see it! And what I see in the source is an empty menu:

    <div id="navcontainer">
    <ul id="navlist">
    </ul>
    </div>

    So just to check what you’ve done so far:
    1. Did you activate the plugin?
    2. Did you create a menu in the Sticky Menu admin with the same name “pannello”?
    3. Also, which version did you install? (version 1.1 is still recommended)

  • 142. Ivan  |  May 10th, 2007 at 5:50 pm

    Sorry tela… I deleded it… Now Is there! ;) See the only gray line that do a cost to cost! :D

  • 141. tela  |  May 10th, 2007 at 11:42 am

    Olivia: To link to an external address you just need to insert an absolute URL, including http://, like http://example.com

    Ivan: Sorry, but I don’t understand exactly where you are at. I don’t see this code in your page.

Pages: « 2220 19 18 17 16 [15] 14 13 12 11 101 »

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