Viewing 4 replies - 1 through 4 (of 4 total)
  • It is possible but you have to modify code.

    Create a child theme and add the following to the child theme’s functions.php file:

    twentyfifteen-child/functions.php

    add_action( 'after_setup_theme', 'register_my_menu' );
    function register_my_menu() {
      register_nav_menu( 'top-header-menu', 'Top Header Menu' );
    }

    Copy the header.php file from twentyfifteen/ to twentyfifteen-child/

    Edit the copied file and add the following to its end

    <?php wp_nav_menu( array( 'theme_location' => 'top-header-menu' ) ); ?>

    Activate this child theme from WP-Admin > Appearance > Themes.

    Go to WP-Admin > Appearance > Menus > Manage Locations tab and assign a menu to the Top Header Menu location.

    At this point the menu will look messed up, post your URL and I’ll provide the necessary code to align it.

    I have tried this and it adds my nav to the top but as a list not a nav menu so the submenu is just added to the list

    Wow. I would love to continue this.

    Is the next step creating CSS in the twentyfifteen-child/style.css file? Would this be based on the * 6.2 Menus section? Would the css selector be “.top-header-menu { … }”?

    .top-header-menu a {
    	display: block;
    	padding: 0.8em 0;
    	position: relative;
    	text-decoration: none;
    }

    I think what is wanted is a horizontal menu/nav bar.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Twenty Fifteen Top Menu’ is closed to new replies.