Manual Integration: do_shortcode
To add HeroMenu to WordPress 2015 Theme, modify the header.php file so that it resembles the following:
<body <?php body_class(); ?>>
<!-- START: HERO MENU -->
<?php echo do_shortcode( '[hmenu id=1]' ) ?>
<!-- END: HERO MENU -->
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyfifteen' ); ?></a>
<div id="sidebar" class="sidebar">
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<?php
if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif;
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) : ?>
<p class="site-description"><?php echo $description; ?></p>
<?php endif;
?>
<button class="secondary-toggle"><?php _e( 'Menu and widgets', 'twentyfifteen' ); ?></button>
</div>
<!-- .site-branding -->
</header>
<!-- .site-header -->
<?php get_sidebar(); ?>
</div>
<!-- .sidebar -->
<div id="content" class="site-content">
The only addition to the code above is the following. (This was added just below the opening body tag)
<?php echo do_shortcode( '[hmenu id=1]' ) ?>
Take note
Remember that menu ID in shortcode is subject to change. Please make sure that you are referencing the correct menu ID.
Manual Integration: wp_nav_menu
The following code is also added just after the opening body tag, instead of using the do_shortcode example, you can use this instead:
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
Take note: Menu location
If you choose to use the wp_nav_menu example, remember to set your menu location under the settings tab in the HeroMenu. Navigate to Hero Menu » Select Menu » Settings » Menu Integration
Example of menu location settings:
