WordPress.org

Ready to get started?Download WordPress

Forums

Adding utiility menu (1 post)

  1. TSemmes
    Member
    Posted 2 years ago #

    I am hoping to add a utility menu to my site. You know the one that links to reads "Home | Contact | Blog, etc" in the upper right hand corner of the page.
    I found this instruction at http://codex.wordpress.org/Navigation_Menus:

    function register_my_menus() {
      register_nav_menus(
        array( 'header-menu' => __( 'Header Menu' ), 'extra-menu' => __( 'Extra Menu' ))
      );
    }

    In the theme I have the function.php file does not include the line
    function register_my_menus() {
    but it does have

    register_nav_menus(
    	array(
    	'primary'=>__('Primary Menu'),
    	)
    );

    which I can edit to add the extra menu. But will this work without the 'register_my_menus function'?
    The article also says to add
    add_action( 'init', 'register_my_menus' );
    which is not in the current theme. But obviously that won't work without the 'register_my_menus function'
    Just want to make sure I can add that function in without messing up the current theme.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.