• Resolved Bob Beaven

    (@bob-beaven)


    I am trying to add a menu to Twenty Ten Theme but any change I make to the Functions template to register the menu either causes the WSOD or in the Appearance Editor just hangs on “updating files”.
    The existing registered manu is
    register_nav_menus( array(
    ‘primary’ => __( ‘Primary Navigation’, ‘twentyten’ ),
    ) );
    I have tried adding to this tag and have tried creating a separate one to no avail.
    Any advice most welcome!

Viewing 1 replies (of 1 total)
  • First things first – create a child theme for your modifications – don’t edit the 2010 theme directly. Once you have a child theme set up, create a functions.php file in the child theme root directory, and place this in it:

    add_action( 'after_setup_theme', 'your_theme_setup' );
    
    function your_theme_setup() {
    register_nav_menu( 'your_menu_name', __( 'Your Menu Name', 'your-localization-string' ) );
    }
Viewing 1 replies (of 1 total)
  • The topic ‘register_nav_menus’ is closed to new replies.