Skip to content

Commit

Permalink
fix adicao de imagem na template full width
Browse files Browse the repository at this point in the history
  • Loading branch information
diegorojas committed May 11, 2018
1 parent 49bdc3b commit ee2a8d1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
14 changes: 14 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,20 @@ input[type="radio"], input[type="checkbox"] {
margin-top: -17%;
}

.image-fullheader {
padding: 0;
margin: 0 auto;
background: #f8f9f9;
max-height: 500px;
overflow: hidden;
width: 100%;
}

.image-fullheader img{
width: 110%;
margin-top: -12%;
}

.page-header .entry-title, .page-header .page-title {
margin-bottom: 0px;
font-size: 24px;
Expand Down
8 changes: 6 additions & 2 deletions template-fullwidth.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@

get_header(); ?>

<div id="content" class="container">
<?php if( has_post_thumbnail() && $img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full', true ) ) : ?>
<div class="image-fullheader">
<img src="<?php echo esc_url( $img[0] ); ?>" alt="<?php the_title(); ?>">
</div><!-- image-fullheader -->
<?php endif; ?>
<div id="content" class="container">
<?php the_title( '<h2 class="fullheader-title">', '</h2>' ); ?>
<div id="fullwidth" class="content-area">

Expand All @@ -29,4 +33,4 @@
</div><!-- #fullwidth -->
</div><!-- #content -->

<?php get_footer(); ?>
<?php get_footer(); ?>

0 comments on commit ee2a8d1

Please sign in to comment.