Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
How can I make the featured images (that display on any page that uses single.php template) appear full width?
Thanks!
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.
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.
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:
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:
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:
That works. Once it’s done I could look at helping getting the design side tweaked.
Thanks Andrew,
I did all that but the featured image still remains inside the content-area/entry-main container.
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.
https://www.yourplatform.biz/services/options/backups/
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?
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
Would you mind zipping your child theme and emailing it to me at Private Snippet?
Thanks