ThemeShaper Forums » Thematic


How to Use 3.0 Menu Navigation with Thematic

(24 posts)
  • Started 11 years ago by Devin
  • Latest reply from JennRost
  • This topic is not a support question
  1. If anyone is running the bleeding edge nighties of WordPress 3.0, and wants to start using the new menu navigation, here's how you would incorporate it into your child theme. I also wrote about this on my site:

    function remove_thematic_actions() {
    if ( function_exists( 'add_theme_support' ) ) {
    	// This theme uses wp_nav_menu()
    	add_theme_support( 'nav-menus' );
    function childtheme_menu() { ?>
    	<div id="access">
      		<div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'thematic'); ?>">
        	<?php _e('Skip to content', 'thematic'); ?></a></div>
      			<?php wp_nav_menu( 'sort_column=menu_order&container_class=menu&menu_class=sf-menu' ); ?>
    		<!-- #access -->
    	<?php }
    Posted 11 years ago #
  2. Devin,

    Saw this first on another thread from Chris, so I didn't know it was your doing. Mad props to you!

    Posted 11 years ago #
  3. @Devin Thanks for sharing this! It's been a highly discussed feature of late in the forums here. Some of us had been holding off on publishing any of code involving the new menu system until it's final or at least beta release given that WP 3.0 and the menu feature is sill in alpha and subject to change.

    I'd be really awesome if you followed back up on this thread after the feature was finally released to see if the code you posted remains functional or better yet could be extended or improved upon :) Thanks for sharing your time and knowledge with us.


    Posted 11 years ago #
  4. @helgatheviking:

    Didn't check the forums before I started my post :)

    .. and I haven't seen the menu_class thing. Devin's version seems to be the better one ;)


    Posted 11 years ago #
  5. I'm glad Chris and Devin *both* posted their solutions :) Shows that Thematic is v. flexible in that regard imho.

    Posted 11 years ago #
  6. @gene You're right. The menu system is still very alpha. I'm discovering that changing the position of items isn't really working as well as a number of other bugs. It's really only good for experimentation with the new feature- not quite ready for prime time.

    In terms of a follow up, I'm hoping Thematic will be updated to take advantage of the new feature when 3.0 is released. Is that the plan Chris?

    Posted 11 years ago #
  7. Hi Devin,

    the support for wp_nav_menu() is on my list. It won't be a radical switch like the one from wp_list_pages() to wp_page_menu(). I might even bring wp_list_pages() back.

    The #access code will become switchable between wp_list_pages(), wp_page_menu() and wp_nav_menu. The switch defaults to wp_page_menu().

    Any other ideas?


    Posted 11 years ago #
  8. I'm looking forward to this change! (although if it's buggy, I think I might hold off a little longer), but I really like the idea of this being something done in the admin section rather than tinkering with the functions file :)

    Posted 11 years ago #
  9. Added some experimental code to Thematic Revision 653.


    Posted 11 years ago #
  10. r653 code works ok for me on test install :)

    Posted 11 years ago #
  11. davidcochran

    WP 3.0 and Thematic are two great arguments for the power of WordPress.

    Devin's code is working great for me with a child theme using WP 3.0 RC 2. I would be interested to know if there are currently any recommended improvements upon it.

    And of course I'm looking forward to the next Thematic release. Thanks to all.

    Posted 11 years ago #
  12. davidthiel


    I'm working on a demo/dev site for a future intranet.... I've gotten the WP 3.0 menus to appear in my site, but the drop down effect is not working (not appearing at all). Adding and removing top level pages using the 3.0 menu system does seem to work just fine.

    I'm new to PHP and trying to hack this together somewhat... can someone take a quick look and tell me if I'm missing something easy?

    EACH of the pages appearing in the menu has at least one subpage, but no dropdown is appearing on mouseover.

    I'm on latest version of WP and Thematic with the additional code Chris provided in his post...


    Posted 11 years ago #
  13. davidcochran

    To davidthiel,
    I'm using Devin's code, which he provided at the top of this topic, with WP3.0 RC 2 and Thematic Dropdowns are working for me just fine, showing subpages and subcategories as they should.

    Devin also provides this code in his blog post, here:

    I'm looking forward to later tweaks. But this seems to be working well at the time being.

    Posted 11 years ago #
  14. davidthiel

    Thanks for the help .... I switched over to Devin's code (and rolled back from the bleeding edge of Thematic, and it seems to be working -- kinda. Take a look now and you'll see that the sub-options are displaying in a somewhat weird way....


    Posted 11 years ago #
  15. lxwx

    Anything new on this topic since WordPress 3.0 came out of beta? Will an update to Thematic be necessary to fully support wp_nav_menu()? I tried adding it into my child theme without any success. (I may post details here later.)

    For instance, in the real 3.0, one apparently uses

    add_theme_support( 'menus' );

    instead of

    add_theme_support( 'nav-menus' );

    Anyway, if anyone has a working example, I'd love to see it. Thanks!

    Posted 11 years ago #
  16. Hi,

    Heads up using add_theme_support in this way is not advised



    Posted 11 years ago #
  17. lxwx

    Thanks Gene!

    I also found these related posts:

    So I will take another crack at my child theme this weekend.

    Posted 11 years ago #
  18. Hello! I'm trying to add / between my menu items so my menu will look like this:

    Home / item 1 / item 2 / item 3

    I am using a Thematic child theme and here is my site:

    Thank you so much for any help!

    Posted 10 years ago #
  19. see the sticky thread on menus. you're going to need a custom walker i think.

    Posted 10 years ago #
  20. Thanks helgatheviking, i figured it out!
    do you know how to move the cat links in thematic to the entry meta? thank you!

    Posted 10 years ago #
  21. that's a totally separate topic and you should start a new post. but i can say you will need filters.

    Posted 10 years ago #
  22. Thank you helgatheviking, I didn't mean to post in the wrong place. I've been posting my questions on the regular feed but no one responds. Do you know how I can get better help? I'd really appreciate anything!! I'm totally new to this.
    Thank you.

    Posted 10 years ago #
  23. no worries... just meant that you'd probably get a better response if you posted your Q as its own thread. i've been super busy w/ Pan-Am games training camp so i can't answer as many as i should.

    though your q seems familiar to me. besides that fact that all filtering is essentially the same process, i've actually answered this one before:
    more than once

    hope that helps. the search function here isn't the best but you can use google and just preface any search with your search term here

    Posted 10 years ago #
  24. Oh awesome, that helps so much! Thank you!! Good luck with your training!

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.