Skip to content

Commit

Permalink
Fix header image option
Browse files Browse the repository at this point in the history
  • Loading branch information
AlxMedia committed Jul 20, 2018
1 parent abbdd60 commit 57a4c1b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion functions.php
Expand Up @@ -109,7 +109,7 @@ function blogrow_custom_header() {
$args = array(
'default-image' => false,
'default-text' => false,
'width' => 1460,
'width' => 1160,
'height' => 300,
'flex-width' => true,
'flex-height' => true,
Expand Down
29 changes: 20 additions & 9 deletions header.php
Expand Up @@ -62,15 +62,26 @@

<div class="container group">
<div class="container-inner">
<div class="pad group">
<?php echo blogrow_site_title(); ?>
<?php if ( display_header_text() == true ): ?>
<p class="site-description"><?php bloginfo( 'description' ); ?></p>
<?php endif; ?>
<?php if ( get_theme_mod( 'header-social', 'on' ) == 'on' ): ?>
<?php blogrow_social_links() ; ?>
<?php endif; ?>
</div>
<?php if ( get_header_image() == '' ) : ?>
<div class="pad group">
<?php echo blogrow_site_title(); ?>
<?php if ( display_header_text() == true ): ?>
<p class="site-description"><?php bloginfo( 'description' ); ?></p>
<?php endif; ?>
<?php if ( get_theme_mod( 'header-social', 'on' ) == 'on' ): ?>
<?php blogrow_social_links() ; ?>
<?php endif; ?>
</div>
<?php endif; ?>

<?php if ( get_header_image() ) : ?>
<div class="site-header">
<a href="<?php echo esc_url( home_url('/') ); ?>" rel="home">
<img class="site-image" src="<?php header_image(); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</a>
</div>
<?php endif; ?>

</div><!--/.container-inner-->

<?php if ( is_page_template( 'page-templates/frontpage.php' ) ) { get_template_part('inc/frontpage-top'); } ?>
Expand Down
2 changes: 2 additions & 0 deletions style.css
Expand Up @@ -527,6 +527,8 @@ box-shadow: 0 0 2px rgba(255,255,255,0.4);
.site-title a { display: block; color: #000; max-width: 100%; }
.site-title a img { display: block; max-width: 100%; max-height: 60px; height: auto; padding: 0; margin: 0 auto; -webkit-border-radius: 0; border-radius: 0; }
.site-description { text-align: center; font-size: 16px; font-style: italic; color: #999; line-height: 30px; position: relative; z-index: 2; }
.site-header { margin-top: 30px; }
.site-image { display: block; margin: 0 auto; max-height: 400px; }

#header .social-links { float: none; text-align: center; margin-top: 20px; }
#header .social-links li { margin: 0 4px; }
Expand Down

0 comments on commit 57a4c1b

Please sign in to comment.