Home>Support>single.php images

single.php images

How can I make the featured images (that display on any page that uses single.php template) appear full width?

Thanks!

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Hi Larry

    Thanks for your support.

    The single featured images are positioned within a constrained container. There, unfortunately, isn’t an easy way to remove that constraint to allow the featured image to be 100% screen width. It’s possible but would require custom development to re-design where the content constraints are and take the featured image outside of those constraints. If you’re interested in going the custom development route we recommend https://codeable.io.

  2. 9 years, 2 months ago Larry

    Hi Andrew,

    Would you mind pointing me to the container and the file(s) I need to work on? I think I can probably figure it out.

  3. 9 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Here is what I’d look at doing:

    1. Use a child theme.
    2. Copy (not cut) content-single.php from the parent to the child theme.
    3. Remove and cut the following lines:

    			<?php if( has_post_thumbnail() && siteorigin_setting('blog_featured_image') ): ?>
    				<div class="entry-thumbnail"><?php the_post_thumbnail( is_active_sidebar('sidebar-1') ? 'post-thumbnail' : 'vantage-thumbnail-no-sidebar' ) ?></div>
    			<?php endif; ?>
    
    

    4. Copy header.php from the parent to the child theme.

    5. Edit header.php and insert the lines we cut earlier. They should be inserted just above:

    <?php do_action( 'vantage_before_main_container' ); ?>
    

    6. Edit the code we just insert and add one more conditional to check if we’re on the single post page. Final result will be:

    	<?php if( is_single() && has_post_thumbnail() && siteorigin_setting('blog_featured_image') ): ?>
    		<div class="entry-thumbnail"><?php the_post_thumbnail( is_active_sidebar('sidebar-1') ? 'post-thumbnail' : 'vantage-thumbnail-no-sidebar' ) ?></div>
    	<?php endif; ?>
    

    That works. Once it’s done I could look at helping getting the design side tweaked.

  4. 9 years, 2 months ago Larry

    Thanks Andrew,

    I did all that but the featured image still remains inside the content-area/entry-main container.

  5. 9 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Do you have a public URL where we can take a look at what’s going on? If you need to keep this URL private from other users, just select “Private Reply” on the bottom right of the comment box.

  6. 9 years, 2 months ago Larry

    https://www.yourplatform.biz/services/options/backups/

  7. 9 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Thanks, checking your source code, for example: https://www.yourplatform.biz/articles/why-you-should-never-use-a-website-builder-to-design-your-website/. I can still see the featured image in it’s original code position within the article tag. Are you sure it was moved from content-single.php and inserted into header.php within the child theme?

  8. 9 years, 2 months ago Larry

    Here is the header.php:

    <?php vantage_render_slider() ?>

    <?php if( is_single() && has_post_thumbnail() &&
    siteorigin_setting('blog_featured_image') ): ?>
    <div class="entry-thumbnail"><?php the_post_thumbnail(
    is_active_sidebar('sidebar-1') ? 'post-thumbnail' :
    'vantage-thumbnail-no-sidebar' ) ?></div>
    <?php endif; ?>

    <?php do_action( 'vantage_before_main_container' ); ?>

    and I removed the code from content-single.php

  9. 9 years, 2 months ago Andrew Misplon
    Hi, I Work Here

    Would you mind zipping your child theme and emailing it to me at Private Snippet?

    Thanks

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More