Make WordPress Core

Ticket #25031: 25031.7.diff

File 25031.7.diff, 2.0 KB (added by iamtakashi, 10 years ago)
  • wp-content/themes/twentyfourteen/functions.php

     
    470470        if ( is_archive() || is_search() || is_home() )
    471471                $classes[] = 'list-view';
    472472
    473         if ( is_page_template( 'full-width-page.php' ) || is_page_template( 'contributor-page.php' ) || is_attachment() )
     473        if ( ( ! is_front_page() && ! is_active_sidebar( 'sidebar-3' ) )
     474                || is_page_template( 'full-width-page.php' )
     475                || is_page_template( 'contributor-page.php' )
     476                || is_attachment() )
    474477                $classes[] = 'full-width';
    475478
    476479        return $classes;
  • wp-content/themes/twentyfourteen/sidebar-content.php

     
    55 * @package WordPress
    66 * @subpackage Twenty_Fourteen
    77 */
     8if ( ! is_active_sidebar( 'sidebar-3' ) )
     9        return;
    810?>
    911<div id="content-sidebar" class="content-sidebar widget-area" role="complementary">
    1012        <?php do_action( 'before_sidebar' ); ?>
    1113
    12         <?php if ( ! dynamic_sidebar( 'sidebar-3' ) ) : ?>
    13                 <aside id="search" class="widget widget_search">
    14                                 <?php get_search_form(); ?>
    15                 </aside>
    16 
    17                 <aside id="link" class="widget widget_links">
    18                         <h1 class="widget-title"><?php _e( 'Blogroll', 'twentyfourteen' ); ?></h1>
    19                         <ul class="xoxo blogroll">
    20                                 <?php wp_list_bookmarks( array( 'title_li' => '', 'categorize' => 0 ) ); ?>
    21                         </ul>
    22                 </aside>
    23 
    24                 <aside id="meta" class="widget">
    25                         <h1 class="widget-title"><?php _e( 'Meta', 'twentyfourteen' ); ?></h1>
    26                         <ul>
    27                                 <?php wp_register(); ?>
    28                                 <li><?php wp_loginout(); ?></li>
    29                                 <?php wp_meta(); ?>
    30                         </ul>
    31                 </aside>
    32         <?php endif; // end sidebar widget area ?>
     14        <?php dynamic_sidebar( 'sidebar-3' ); ?>
    3315</div><!-- #content-sidebar -->