New Landing How can we help? Themeforest Theme Support Neighborhood Making thumbnails square in the blog carousel and recent posts widget

Viewing 14 posts - 1 through 14 (of 14 total)
  • #154145
    studio33b
    Member
    Post count: 5

    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!!

    #154215
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    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

    #154252
    internetplus787
    Member
    Post count: 7

    Hi.

    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.
    #154258
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Please provide me with your link

    – Kyle

    #154260
    studio33b
    Member
    Post count: 5

    Hi 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!

    #154261
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Go 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

    #154295
    internetplus787
    Member
    Post count: 7

    Excellent.Thank you Kyle. That worked perfectly! Great theme and great support.

    #154298
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem 🙂

    #155753
    studio33b
    Member
    Post count: 5

    Hi 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!

    #155959
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    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

    Regenerate Thumbnails

    hope it helps

    -Rui

    #156139
    studio33b
    Member
    Post count: 5

    Hi 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:

    http://thebritishkitchen.co

    Do you have any other thoughts or suggestions on what might be causing this?

    Thanks guys!

    James

    #156236
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you provide admin access to check your settings?
    Thanks

    -Rui

    #156360
    studio33b
    Member
    Post count: 5
    This reply has been marked as private.
    #157181
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    For 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

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register