Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Featured images appear in full size on the main blog page, but I would like to have them e.g. in thumbnail size. I have the same problem, as previously described in CE3 WP theme http://community.theturninggate.net/top … mage-size/ but using the CE4 WP theme. Does the proposed solution also apply to CE4, and can you a bit more specific on what to change in the code on the site linked to above ?
Thanks a lot.
Offline
you'll nee to create a child theme.
As Matt mentions in that other thread, the image size designation for Featured Images is hard coded so you'll need to change the code in the theme.
I don't know how many places that the feature image size for the home page is designated. I'm guessing it might only be in the loop. So copy the loop.php file into your child theme and edit the part that tells WordPress to feed the large size image to the home page posts. You can try searching on "featured_image_" to find it.
So try changing this:
<?php // has post_thumbnail and post_thumbnail is displayed:
if ( is_home() && has_post_thumbnail() && of_get_option('featured_image_home')){
$imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
to this:
<?php // has post_thumbnail and post_thumbnail is displayed:
if ( is_home() && has_post_thumbnail() && of_get_option('featured_image_home')){
$imgdata = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large_thumb' );
and see what happens.
The worse thing that could happen is that it doesn't work and you just switch back to the main theme.
Well, you could break your blog and get the white screen of death. Still not a big deal. Just delete the loop.php file from the child theme via ftp and then fix whatever syntax got messed up.
Creating a child theme is pretty easy. You'll find all sorts of information on creating one on the web.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Pages: 1