Fullwidth blog image

Hey there,
I’d like the title picture to be fullwidth. By the way, would you recommend to hide the blogpost title in order to add a customizable headline in cornerstone for each post?
Thanks for your help!

Hi there,

You can achieve this by overriding the template file for the singe posts through the child theme.

First, login through FTP then go to wp-content/themes/pro-child/framework/views/ethos then create the file content.php then edit the file and add this code:

<?php

// =============================================================================
// VIEWS/ETHOS/CONTENT.PHP
// -----------------------------------------------------------------------------
// Standard post output for Ethos.
// =============================================================================

$is_index_featured_layout = get_post_meta( get_the_ID(), '_x_ethos_index_featured_post_layout',  true ) == 'on' && ! is_single();

?>
<?php if ( has_post_thumbnail() ) : ?>
  <div class="entry-featured">
    <?php if ( ! is_single() ) : ?>
      <?php x_ethos_featured_index(); ?>
    <?php else : ?>
      <?php x_featured_image(); ?>
    <?php endif; ?>
  </div>
<?php endif; ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  <?php if ( $is_index_featured_layout ) : ?>
    <?php x_ethos_featured_index(); ?>
  <?php else : ?>
    <div class="entry-wrap">
      <?php x_get_view( 'ethos', '_content', 'post-header' ); ?>
      <?php x_get_view( 'global', '_content' ); ?>
    </div>
  <?php endif; ?>
</article>

Then add this code to the Global CSS:

.single-post .entry-featured img {
    width: 100%;
    margin-bottom: 30px;
}

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.