WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic drop-down menu. (31 posts)

  1. fokjulle
    Member
    Posted 7 years ago #

    No, I'm not talking about a 'folding' menu. What I want to know is whether or not it is possible to create a dynamic type drop-down menu for main navigation.

    For example, the menu is:

    ABOUT | STUFF | MORE STUFF | CONTACT

    On rolling over any of those, how does one create a sub-menu that drops down, which includes more pages.

    This is to keep a complex navigation simple and clean.

  2. vkaryl
    Member
    Posted 7 years ago #

    Well, there's always the son of suckerfish menu setup (I can't find the bookmark, you'll have to use google); there's this site: http://www.tjkdesign.com/articles/dropdown/3.asp - lot of listings in google....

  3. The_ROb
    Member
    Posted 7 years ago #

    fokjulle, if you find the answer. Let me know.

    rob

  4. fokjulle
    Member
    Posted 7 years ago #

    Thanks. But those examples are not quite on the mark...

  5. muskokee
    Member
    Posted 7 years ago #

    Hi fokjulle,

    I might have what your looking for. It's a menu I created for myself.

    It's a cross-browser, dynamic css menu system for WordPress. Not a plugin, but no need to modify core files. You can get it here: Webdezine WordPress Menu. All info is in the read_me file located in the zip.

    Leave me some feedback on the site about how it works for you. Let me know if there are any bugs.

    Best,
    Sheri

  6. sfong15
    Member
    Posted 7 years ago #

    I have to say muskokee's menu is nicer. I did a similar drop-down menu to keep my theme clean and simple, head over here to have a look. If you see the dark one flip over to the other theme at the footer you'll see the menu.

    It uses javascripts not as fast loading as muskokee's and it looks better in FF.

  7. muskokee
    Member
    Posted 7 years ago #

    Thank you sfong15!

  8. IcelandDream
    Member
    Posted 7 years ago #

    ouch. the muskokee menu looked hopeful. I read the whole thing and at the end, found that it only works with php 5+.. (hint, put that tidbit higher in the text so that fewer hearts are broken. :) )

    I'm new to WP but it looks flexible enough to add code snippets to the theme. google, get, enjoy.

  9. muskokee
    Member
    Posted 7 years ago #

    Well, if there is a need for it, I can rewrite it for under php5. But...PHP5 is really the safest version ;) I need a tester

    Not sure what you mean by this:

    I'm new to WP but it looks flexible enough to add code snippets to the theme. google, get, enjoy.

  10. IcelandDream
    Member
    Posted 7 years ago #

    Not sure what you mean by this:

    I meant WP in general is easy to add code snippets to.

    But yeah, lots of servers still run PHP4 without fear...

  11. muskokee
    Member
    Posted 7 years ago #

    Yup, WP is not the most complicated code.
    I changed the query results to arrays rather than leave them as objects, so all should be good to go for PHP4. Since I'm on 5 I can't verify that the menu works (can't see why not!). If someone on PHP4 could test it that would be great. The link to the menu is the same as the last one. Just scroll to the bottom for the additional download

  12. IcelandDream
    Member
    Posted 7 years ago #

    wow, that was nice of you!
    so far I'm getting a blank page when I add the require statement.
    I dropped the .php & css into my theme dir and added the require statement (I also tried include_once(dirname(__FILE__) . '/webdezine_list_menu.php');)

  13. muskokee
    Member
    Posted 7 years ago #

    Did you add a link to the css? I didn't put that in the read_me file --oops
    are you adding the require statement to the header.php in the theme dir?

  14. sfong15
    Member
    Posted 7 years ago #

    Muskokee, I'll be glad to be chosen as your tester. My host doesn't do php5+ yet and I know a bit of php and have done a few themes/plugins (my test site here so I could help testing your menu out.

    The javascripts menu I did came from DHTMLGoodies which I didn't have to touch, I worked on the CSS to make it work on my theme only.

  15. muskokee
    Member
    Posted 7 years ago #

    Hi sfong15,
    Please go ahead, take the menu and test away. The menu code is pretty straight forward. Let me know how it turns out.

  16. sfong15
    Member
    Posted 7 years ago #

    muskokee, I'll try your original version for php5 in due course. Just got reply from my hosting that I could in fact have php5.2 running by a custom .htaccess file.

    I'll start doing this when I finish modding my new recent comment plugin. I'm puzzled about a time zone issue at the moment.

  17. muskokee
    Member
    Posted 7 years ago #

    Sure. I understand about modification frustrations. They just have to be sorted out!

  18. LK
    Member
    Posted 7 years ago #

    Here is another option that works well if you only want pages (and no categories) in your menu:

    http://www.InvokeMedia.com

    It does require a hack to the core code (see step 6 at the bottom of the page -- the file they reference has changed to wp-includes/post-template.php), so it won't be the right solution for everyone.

    You can add a little more control over your menu with this plugin from Garrett Murphy too.

  19. Rok
    Member
    Posted 7 years ago #

    Check, son of suckerfish menu, head over to my blog here

  20. sfong15
    Member
    Posted 7 years ago #

    Just tried the webdezine menu there are couples of issues

    There is a missing close bracket at line 198, fixed, a step forward.

    I put just `<?php
    webdezine_list_cats();
    ?>` as a quick test and I got this

    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 '->categories order by category_parent, cat_name' at line 1]
    select category_parent, category_count, cat_name, cat_ID from $wpdb->categories order by category_parent, cat_name

    By the way I put the require statement within body tag, guess this is OK. CSS required is appended to the existing CSS file so referencing is not a problem in my case.

    In my template I have only this for a quick test

    <div class="menucont">
    <div class="topmenu">
    <?php webdezine_list_cats(); ?>
    </div>
    </div>

    Am I missing anything?

  21. muskokee
    Member
    Posted 7 years ago #

    Hi sfong15,

    Sorry about the errors. I have fixed them and will post the next version just as soon as bluehost gets their act together. It's soon time to give another host my business. In my own menu I called the tables directly rather than going through wordpresses $wpdb-> , so I didn't have a chance to debug those queries. Done now. Give about an hour before I get the new file uploaded.

    Will also amend the PHP4 version

  22. muskokee
    Member
    Posted 7 years ago #

    OK, new files uploaded! and available from webdezine wordpress menu v1.1

  23. Seaborn
    Member
    Posted 7 years ago #

    Mushokee, Will your drop down menu work for an RSS Feed. For example, if I wanted to have a drop down menu that listed a handful of titles imported from a feed, would that work?

  24. muskokee
    Member
    Posted 7 years ago #

    not right now. i have had a suggestion to allow user entered links and it is on the table for the the next version.

  25. feale
    Member
    Posted 6 years ago #

    Arrrgh! This is exactly what I'm looking for and muskokee's site is "in transition"!

    Anyone have another link for this?

    Thanks

  26. twofivethreetwo
    Member
    Posted 6 years ago #

    I would also be interested in the files linked above if anybody has them.

  27. JHouse
    Member
    Posted 6 years ago #

    Here's a pretty good SEF (search engine friendly) dropdown menu that I used on this client's site http://www.FreshTracksTransportation.com recently. You can download the menu here: http://www.jillij.com/category/website-related/ (just scroll down 'till you see "Jillij theme version 11).

    The only problem with this menu is that you can't click the main links at the top of the dropdown menu, only within the dropdown menu, if that makes any sense. If you check out the site above, you should see what I'm talking about. I'm using version 9 of this dropdown menu, however, the menu author recently launched version 11 so hopefully the aforementioned issue isn't, uhhh, an issue any longer. In any case, it's a cool looking dropdown menu in Firefox.

    Good luck.

  28. tubes1
    Member
    Posted 6 years ago #

    JHouse - FYI, that menu breaks in Safari.

    I'm a big fan of this menu as it seems to work in all browsers.

    http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm

  29. mightybutton
    Member
    Posted 6 years ago #

    So far I haven't found a viable solution for someone who doesn't know php. However, I did find muskokee's solution on someone else's site, since it seem muskokee's site is still "in transition" (be sure to look at the attachment at the bottom of the page).

    http://www.thanhsiang.org/faqing/node/58

    Unfortunately, I've tried this solution and get some db errors. Since I am a lowly marketer and not a programmer it's all greek to me.

    Anyone aware of plugin that doesn't require me hacking or knowing php?

  30. ashiado
    Member
    Posted 6 years ago #

    Incorporating a dropdown menu into a WP theme seems to be a frequent request/desire, and with good cause. I'm still working on this myself, so don't have a full solution to offer except that there seems to be hope with the NAVT navigation menu plugin because it generates nested unordered lists for the custom menu group(s) you create. On this basis you can then customize CSS for those unordered lists and get dropdown menus. I was initially hoping for a less complicated solution, but after having discovered that the Kubrick Tabs Theme plus dTabs led to buggy/unpredictable display results, i decided to rebuild from scratch using the K2 theme (great!) plus NAVT (also great). This combo looks like it will work, but I'm still working through it all... if anybody has any tips here, they would be much appreciated! My goal is: tab based menus where the active main tab stays highlighted when you are on a sub-page of that section and where dropdown menus show up when hovering over any of the tabs that have sub-pages assigned to them...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags