Sticky menu vtičnik za Wordpress
Posted by admin in wordpress
Si že kdaj postavljal bolj kompleksno spletno stran z Worpress-om? Če je odgovor Da, potem si imel verjetno težave z menuji, saj jih Wordpress avtomatsko generira. Z vtičnikom Sticly menu lahko generiraš potrebne menuje in jih postaviš točno tam, kjer jih potrebuješ. Pa še zelo enostaven je za uporabo!
- Prenesi vtičnik: sticky_menu.zip
- Razširi in naloži mapo v mapo z vtičniki (ponavadi: /wp-content/plugins/).
- Aktiviraj vtičnik.
- Pojdi v ‘Manage -> Sticky Menu’ in kreiraj svoj menu.
- Dodaj sledečo kodo v datoteke svoje teme, kjer želiš, da se prikaže abecedni seznam (index.php, archive.php):
$menu = new stickymenu;
$menu->display_menu(’menu=Main’); //Prikaže menu ‘Main’
Vtičnikova domača stran.



I find this plugin very usefull, but I needed it to show which menu item is active. So I posted a trouble ticket at plugin’s homepage, but didn’t get an answer. So I digged in and found the solution:
/wp-content/plugins/stickymenu/stickymenu.phpand add above:
and replace it with:
.active_menuas you would like active menu item to appear.And that’s it!
Please, I cannot find this:
// Ignores page_on_front. Internal use only.
function get_page_link2( $id = false ) {
global $post, $wp_rewrite;
if ( !$id )
I think that You have inside zip quite new version sticky menu. Pity..
OK, I catch it but it print error:
Warning: strstr() [function.strstr]: Empty delimiter in …/wordpress/wp-content/plugins/stickymenu/stickymenu.php on line 105
Sorry, I’m back down, probably I’m too stipid for this… Can You share you stickymenus?
Hi Jurek,
maybe there was a problem closing the get_page_link2 function. It’s hard to say without seeing the code … So, here is my stickymenu.php (not full plugin, just overwrite your stickymenu.php file).
I hope that helps.
Hi, thanks a lot for php, but now I undrestood that it cant works, because some of subpage is currently completely other page, merged by one header! Look at my adress on home or linki and gallery, there are different!
Thanks a lot for help!
Hi Jurek,
aha I understand what you mean. You could still use the plugin for /wordpress/ pages, just add ../zenphoto/ for Galeia link.
On your Galeria page you can’t use the plugin because it’s not part of wordpress, so you probably made the menu by hand. If you want you can play a little and get sticky menu plugin to work on wordpress pages
bby
I left a comment on the publisher’s page for Sticky Menu and I’m doing so here as well: same topic. Why?
Either I don’t fully understand the way the SM plug-in works or I’m doing something wrong (entirely possible on both accounts!), but I don’t see the need for SM.
I can build a ‘text box’ widget to construct a custom menu in about the same amount of time it takes to build the SM.
So Why use it? Does it do something I’m not seeing. I’ve never gotten it to work correctly either.
As well, you say to add the code to index and archive files, while the publisher says the header, sidebar and footer files. ?? I’ve tried both; the publisher’s makes more sense; but I’ve never gotten either to work.
I’m open minded - convince me I need to use this - or explain what SM is really trying to do different than the ‘text box’ widget mentioned above.
Thanks
net500cg
Hi Les Booth,
yes, menus are usualy placed in sidebar, header or footer, but in my case sidebar contained pool, mailinglist and some other stuff which are always visible.
I used horizontal main menu and several vertical submenus which I placed on index and archives files. So where you place the menu is up to you and your needs. I used Sticky menu plugin because I had 5 different submenus and each is shown on some specific pages. One submenu is not shown all the time, just on some pages.
If you can solve your menu problem with text box then good for you, but it was not working for my problem, so I found this plugin and it was just what I needed and it worked fine the first time I used it.
Everybody has specific needs for their page and there are many options for solving them, so use what suits you best.
I’m not trying to convince you into anything, I just share my experience and hopefully someone finds it helpfull.
Good luck!