Wednesday, 6 February 2013

Wordpress theme location not working in child theme

I was having an issue with calling the 'theme_location' in the function 'wp_nav_menu'  in a child theme I've created. Let me explain.

I am working on a website that has been created by someone else.  On the 'header.php' page in their template they are using this call to bring up a drop down menu.

                                        'menu_class' => '',
                                        'menu_id' => '',
                                        'theme_location' => 'farm',
                                        'container' => '',


register_nav_menus( array(
        'farm' => __( 'Farm World', 'dairyland-2012' ),

however once I used a child theme the 'theme_location' does'nt work. 

The solution to this was that I needed to reassign the menu items in Theme Locations in admin > appearance > menus

As pictured

No comments: