• Resolved max-sewell

    (@max-sewell)


    https://www.cyberalert.com/blog/

    I’m using a Twenty Twelve Child theme to add a blog to an HTML web site. This blog has no pages, just posts.

    I’ve hard coded a menu for the blog page that replicated the HTML site navigation.

    I would like to replace the blog menu with a WordPress theme menu (appearances>menus) to add Custom Links on the blog page that link to the HTML pages outside of WordPress.

    When I add this code to header.php:

    <?php wp_nav_menu( array( ‘theme_location’ => ‘header-menu’ ) ); ?>

    I see a “Home” link (only) in spite of the fact that my menu consists of ten items, many with drop-down links.

    I have saved it. I have selected it as my primary menu.

    Can anyone tell me what I’m missing here?

    Thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter max-sewell

    (@max-sewell)

    I’ve found I’d been using the wrong code on header.php. It should have been:

    <!– #site-navigation –>
    <nav id=”site-navigation” class=”main-navigation” role=”navigation”>
    <button class=”menu-toggle”><?php _e( ‘Menu’, ‘twentytwelve’ ); ?></button>
    “><?php _e( ‘Skip to content’, ‘twentytwelve’ ); ?>
    <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘nav-menu’ ) ); ?>
    </nav><!– #site-navigation –>

Viewing 1 replies (of 1 total)
  • The topic ‘Twenty Twelve theme menu only shows "Home" button?’ is closed to new replies.