Make WordPress Core

Ticket #29799: default-menu.diff

File default-menu.diff, 1.1 KB (added by jeherve, 11 years ago)

Display a default menu when no custom menu was created

  • src/wp-content/themes/twentyfifteen/sidebar.php

    diff --git src/wp-content/themes/twentyfifteen/sidebar.php src/wp-content/themes/twentyfifteen/sidebar.php
    index a8a40d5..6119024 100644
     
    99
    1010if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' )  ) : ?>
    1111        <div id="secondary" class="secondary">
    12                 <?php if ( has_nav_menu( 'primary' ) ) : ?>
    1312                <nav id="site-navigation" class="main-navigation" role="navigation">
    1413                        <?php
    1514                                wp_nav_menu( array(
    if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 
    1817                                ) );
    1918                        ?>
    2019                </nav><!-- .main-navigation -->
    21                 <?php endif; ?>
    2220
    2321                <?php if ( has_nav_menu( 'social' ) ) : ?>
    2422                <nav id="social-navigation" class="social-navigation" role="navigation">
    if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 
    3937                </div><!-- .widget-area -->
    4038                <?php endif; ?>
    4139        </div><!-- .secondary -->
    42 <?php endif; ?>
    43  No newline at end of file
     40<?php endif; ?>