New Landing How can we help? Themeforest Theme Support Uplift Recent Posts Widget – Change Image Size

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Uplift
  • #303905
    mar23
    Member

    Hey guys,

    I’m trying to customise the Swift Framework Recent Posts Widget and make the image the full size of my sidebar instead of the 50px by 50px default.

    I’ve tried adding this to my CSS:

    .recent-posts-list li .recent-post-image img {
        width: 100% !important;
        height: auto !important;
    }

    The feature image I’m using is 250 x 375. But no matter what I do the image keeps displaying as 50 x 50, which is making it blurry (see attached screenshot).

    Is there a way around this, or is it way more work than its worth?

    Thanks!

    Attachments:
    You must be logged in to view attached files.
    #304190
    David Martin – Support
    Moderator
    Post count: 20834

    I cannot see your site without a login.

    Please install and activate the supplied child theme, inside the child theme functions.php file and paste this:

    function uplift_sf_widget_posts_thumb_width() {
    	return '400';
    }
    add_filter('sf_widget_posts_thumb_width', 'uplift_sf_widget_posts_thumb_width');
    
    function uplift_sf_widget_posts_thumb_height() {
    	return '375';
    }
    add_filter('sf_widget_posts_thumb_height', 'uplift_sf_widget_posts_thumb_height');
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.