Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Making thumbnails square in the blog carousel and recent posts widget
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Making thumbnails square in the blog carousel and recent posts widget
Tagged: thumbnail sizes
- This topic has 13 replies, 4 voices, and was last updated 9 years by Kyle – SUPPORT.
-
Posted in: Neighborhood
-
March 2, 2015 at 1:50 am #154145
Hi everyone
I’ve been trying to figure out how to change the size of the Swift framework recent posts widget so that the post thumbnails appear as square and not rectangular.
I would also like to change the thumbnails in the ‘blog carousel’ within the page builder, so the post thumbnails also appear square.
Can anyone offer any ideas as to how I might achieve this?
Thanks a lot for you help – I am totally in love with this theme!!
March 2, 2015 at 8:50 am #154215Hi
You’ll need to open the functions.php file and edit these sizes:
/* THEME SUPPORT ================================================== */ add_theme_support( 'structured-post-formats', array( 'audio', 'gallery', 'image', 'link', 'video' ) ); add_theme_support( 'post-formats', array( 'aside', 'chat', 'quote', 'status' ) ); add_theme_support( 'automatic-feed-links' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'woocommerce' ); set_post_thumbnail_size( 220, 150, true); add_image_size( 'widget-image', 94, 70, true); add_image_size( 'thumb-image', 600, 450, true); add_image_size( 'thumb-image-twocol', 900, 675, true); add_image_size( 'thumb-image-onecol', 1280, 960, true); add_image_size( 'blog-image', 1280, 9999); add_image_size( 'full-width-image', 1280, 720, true); add_image_size( 'full-width-image-gallery', 1280, 720, true);
– Kyle
March 2, 2015 at 10:05 am #154252Hi.
I am facing a similar issue I think, where I am trying to adjust the Thumbnail Sizes in Recent Posts (as per attachment 1). I was able to adjust the dimensions of the images for Related Posts (as per attachment 2) but have not been able to do so for Recent Posts.
I tried to adjust the code snippet you’ve posted above, but am not sure I did it correctly. Could you please provide more guidance and/or advise if you feel I should lodge this under a separate request.
Thanks. Alessio
Attachments:
You must be logged in to view attached files.March 2, 2015 at 10:10 am #154258Hi
Please provide me with your link
– Kyle
March 2, 2015 at 10:14 am #154260Hi Kyle
Thanks for getting back to me.
The link is as follows:
http://thebritishkitchen.co/instagram-feed/
I would like to make them square as the photos are taken from instagram
Thanks!
March 2, 2015 at 10:16 am #154261Go to dante/swift-framework/page-builder/builder/shortcodes/recent-posts.php and edit line 173:
$image = sf_aq_resize( $thumb_img_url, 420, 315, true, false);
– Kyle
March 2, 2015 at 11:02 am #154295Excellent.Thank you Kyle. That worked perfectly! Great theme and great support.
March 2, 2015 at 11:08 am #154298No problem 🙂
March 8, 2015 at 6:28 am #155753Hi Kyle
Thanks for looking into this – I changed the line of code for the posts carousel and it took care of it (they are now square).
I also edited the line of code in the functions.php file to make the post thumbnails in the recent posts widget square, however i’m not sure if I did it correctly as it didn’t make any difference.
I changed the line:
add_image_size( ‘widget-image’, 94, 70, true);to this:
add_image_size( ‘widget-image’, 94, 94, true);Was this the correct line to change?
Thanks again for your help!
March 9, 2015 at 12:31 pm #155959Hi,
I think that’s right, but when the images it generate the old thumbnail size, so you probably need to regenerate the thumbnails to create new ones with the new image size.
Use this plugin
hope it helps
-Rui
March 10, 2015 at 2:39 am #156139Hi Rui
Thanks for getting back to me.
I have installed and run the plugin you suggested, however the thumbnails have remained the same size. I also emptied the cache and tried to switch off the performance under performance options however it made no difference to the thumbnail size:
Do you have any other thoughts or suggestions on what might be causing this?
Thanks guys!
James
March 10, 2015 at 11:27 am #156236Hi,
Can you provide admin access to check your settings?
Thanks-Rui
March 11, 2015 at 1:38 am #156360This reply has been marked as private.March 13, 2015 at 2:47 pm #157181For the widget images you need to go to neighborhood/includes/widgets and edit the file for the widget you are using, you will see a line similar to:
$image = aq_resize( $thumb_img_url, 94, 75, true, false);
– Kyle
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.