WordPress.org

Ready to get started?Download WordPress

Forums

Post Tiles
[resolved] Resize featured image to match tile size (3 posts)

  1. NoHoSe
    Member
    Posted 1 year ago #

    I wanted to have my featured images shown completely as tile background i.e. no cropping).
    I tried as per http://wordpress.org/support/topic/featured-image-thumbnails-1 without success.
    The solution I found was to replace (in post-tiles.php) the following code around line 565:
    $featured_style = "style='background: url(".$url.") 0 0;' class='featured-image ".$animation_style." ".$cat_var."'";
    by this one:
    $featured_style = "style='background-image: url(".$url."); background-size: contain;' class='featured-image ".$animation_style." ".$cat_var."'";
    Just thought I'd share this...

    http://wordpress.org/extend/plugins/post-tiles/

  2. ethanhackett
    Member
    Plugin Author

    Posted 1 year ago #

    Awesome thanks NoHoSe.

    Just as an FYI background-size isn't supported in IE8. So though it's a good solution it can alienate some users.

  3. sytseelzinga
    Member
    Posted 1 year ago #

    Worked for me! thanks. I changed the 'contain' to 135%...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic