Adding a wordpress menu in my child theme functions.php (1 post)

  1. andersedvardsen
    Posted 3 years ago #


    I wish to add a couple of menus to my WordPress menu system. to do this, changes need to be made to the functions.php, but i would like to do this in a child theme so that future updates will not be a problem. I know how the wordpress codex say we should treat functions.php in a child theme, but i can't seem to do it right. This is the code in the theme functions.php

    function register_main_menus() {
    			'primary-menu' => __( 'Primary Menu' ),
    			'secondary-menu' => __( 'Secondary Menu' ),
    			'footer-menu' => __( 'Footer Menu' )
    if (function_exists('register_nav_menus')) add_action( 'init', 'register_main_menus' );

    Say i for exaple would like to add a specific category menu to the wordpress menu system by adding this in the function:

    'category-menu' => __( 'Category Menu' ),

    How would the code to do this look in the child theme functions.php?


Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by andersedvardsen
  • This topic is not resolved
  • WordPress version: 3.4.2