Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to wrangle images for blog page in Eleven40
Tagged: archive, blog page, Eleven40, Excerpt, post image, thumbnail image
- This topic has 2 replies, 2 voices, and was last updated 11 years ago by worldviewpr.
-
AuthorPosts
-
August 26, 2013 at 7:29 pm #58972worldviewprMember
Eleven40 is a lot of fun and I am customizing away. But one niggling issue.
I have always assumed that Post image is the large issue for the single page view and the thumbnail of that image would appear on the blog page with the excerpt as well as the archive (maybe).
Currently I have archive image checked on as thumbnail.
So how do I get the
thumbnail to wrap left on front page (blog page)
post image appear in its larger size on SIngle page
and thumbnail again later in the archive view?"Tanks. Lots of tanks" ~ Warren Zevon
http://www.halfwaytoconcord.comAugust 29, 2013 at 3:21 am #59479Sridhar KatakamParticipant1) Add the following at the end of child theme's style.css (WP dashboard -> Appearance -> Editor):
.home img.grid-featured { float: left; margin-right: 1.5rem; }
2) Add this in child theme's functions.php:
add_image_size( 'single-large', 0, 0 ); add_action ('genesis_before_entry','sri_show_featured_image'); function sri_show_featured_image () { if ( is_single() && has_post_thumbnail()) { ?> <div class="entry-image"> <?php the_post_thumbnail( 'single-large' ); ?> </div> <?php } }
and use this CSS:
.single .entry-image { margin-bottom: 2rem; }
3)
and thumbnail again later in the archive view?
I see the left floating thumbs with text wrapping around in archives like http://www.halfwaytoconcord.com/category/business-news/tech-news/ for example. Can you elaborate?
September 3, 2013 at 11:24 am #60465worldviewprMemberThat worked great, thank you.
Now for the single page view. Can you help me do the same thing on the single view page? Currently the image appears above the headline (title). is there a function to move it to below headline and have content wrap around it, as well?
with the code you already supplied (thanks again)
.home img.grid-featured {
float: left;
margin-right: 1.5rem;
}.single .entry-image {
margin-bottom: 2rem;
}
would there be a change to the lower section for .single .entry-image? Not sure how to adjust the code in function.php file
//* Reposition the secondary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_subnav' );//* Align post images on Front Page to the Left with wrap *//
add_image_size( 'single-large', 0, 0 );add_action ('genesis_before_entry','sri_show_featured_image');
function sri_show_featured_image () {
if ( is_single() && has_post_thumbnail()) { ?>
<div class="entry-image">
<?php the_post_thumbnail( 'single-large' ); ?>
</div>
<?php }
}
Thanks in advance for any help. bgr
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.