ThemeShaper Forums » Thematic



(4 posts)
  • Started 12 years ago by Chris
  • Latest reply from squidz
  • This topic is not a support question
  1. Hi,

    do not use add_theme_support('menus') in your functions.php. I already removed it from the current SVN copy.

    Here's the answer from Andrew Nacin regarding the question if a theme needs this call in the functions.php:

    This is incorrect. add_theme_support('menus') is an internal process only. *It should never be directly called.* Instead, the theme should be calling register_nav_menu(s) which will trigger add_theme_support('menus') internally.

    Likewise, add_theme_support('widgets') is internal only. The theme should only be calling register_sidebar(s).


    Posted 12 years ago #
  2. Chris - I'm new to Thematic and coming from designer-world. In experimenting with building a child theme for my own site, I'm interested in setting the main nav in a vertical fashion.

    I found a post that shows an easy snippet to try this. However, I've also found various links by Gene to your post here about not using add_theme_support('menus'), but calling register_nav_menu(s) instead. Another example by Helgatheviking used both.

    So, being somewhat clueless here, I'm curious what the correct way to use this code from Tarpontech should be:

    function go_vertical( $args ) {
    $args[ 'menu_class' ] = 'sf-menu sf-vertical';
    return $args;
    add_filter( 'thematic_nav_menu_args', 'go_vertical' );

    Using this in conjunction with Gene's:

    add_theme_support( 'menus' ); **** can register_nav_menu(s) directly replace this? ***

    function child_access_menu() {
    $menu_sys = 'wp_nav_menu';
    return $menu_sys;
    add_filter('thematic_menu_type', 'child_access_menu');

    Posted 12 years ago #
  3. squidz- my code definitely pre-dated this new announcement to not use add_theme_support. your post made me curious and both your snippets of code work for me on the latest, stable thematic (709) WITHOUT add_theme_support('menus'). give it a shot.

    Posted 12 years ago #
  4. Will do!! Thanks.

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.