How do I add a new menu using a child theme?
-
Hello I am using a child theme and i need to add another menu to the template. When I add the following to the new functions.php file in my child theme, i get an error.
<?php function register_main_menus() { register_nav_menus( array( 'primary-menu' => __( 'Primary Menu' ), 'secondary-menu' => __( 'Secondary Menu'), 'tertiary-menu' => __( 'Tertiary Menu'), ) ); } if (function_exists('register_nav_menus')) add_action( 'init', 'register_main_menus' );?>
I know i am not doing this right but I do not know how to fix it. Please help. The error is below thanks!
Fatal error: Cannot redeclare register_main_menus() (previously declared in /home/content/c/o/m/companyserver/html/rajwa2/wp-content/themes/ChildOfChameleon/functions.php:8) in /home/content/c/o/m/companyserver/html/rajwa2/wp-content/themes/Chameleon/functions.php on line 46
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How do I add a new menu using a child theme?’ is closed to new replies.