Skip to content

Commit

Permalink
avoid outputting an empty div here even when the ad zone is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
aschweigert committed Aug 25, 2016
1 parent e1c30f5 commit ecdc31c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
32 changes: 15 additions & 17 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@

<div id="page" class="hfeed clearfix">

<?php get_template_part( 'partials/nav', 'sticky' ); ?>

<?php get_template_part('partials/header-ad-zone'); ?>
<?php

get_template_part( 'partials/nav', 'sticky' );

if ( of_get_option( 'leaderboard_enabled' ) == TRUE ) {
get_template_part( 'partials/header-ad-zone' );
}

<?php
/**
* Fires before the Largo header content.
*
Expand All @@ -103,26 +106,21 @@
* @since 0.4
*/
do_action( 'largo_after_header' );
?>

<?php

get_template_part( 'partials/nav', 'main' );

if ( SHOW_SECONDARY_NAV === TRUE ) {
get_template_part( 'partials/nav', 'secondary' );
}
?>

<?php get_template_part('partials/homepage-alert'); ?>

<?php
get_template_part('partials/homepage-alert');

/**
* Fires after the Largo navigation content.
*
* @since 0.4
*/
do_action( 'largo_after_nav' );
/**
* Fires after the Largo navigation content.
*
* @since 0.4
*/
do_action( 'largo_after_nav' );

?>

Expand Down
4 changes: 2 additions & 2 deletions partials/header-ad-zone.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
if (is_active_sidebar('header-ads')) { ?>
if ( is_active_sidebar( 'header-ads' ) ) { ?>
<div class="header-ad-zone max-wide">
<div id="header-ad-zone-container">
<?php dynamic_sidebar('header-ads'); ?>
<?php dynamic_sidebar( 'header-ads' ); ?>
</div>
</div>
<?php } ?>

0 comments on commit ecdc31c

Please sign in to comment.