The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

WPNewsman Lite
[resolved] Using custom image sizes for thumbnail inside posts (4 posts)

  1. aWEBthatWORKS
    Posted 3 years ago #

    I'm trying to use the thumbnail code, but use a different sized image, which I've defined in my functions.php file (called featured-image). I've tried this:

    ><img alt=" " border="0" class="story-image" height="175" src="[newsman post='featured-image' placeholder='200x144.gif']" width="253" /

    but it only seems to work when I use post='thumbnail'. Unfortunately my images don't crop well into a square. Has anyone else had this problem and found a work-around?


  2. aWEBthatWORKS
    Posted 3 years ago #

    I'm so sorry, this was a stupid question.

    The 'thumbnail' refers to a WP newsman variable, not the image name. To solve it, I've regenerated all the site thumbnails (under Settings > Media, then using Regenerate Thumbnails plugin) to get them the right size, so when I embed them, they'll appear properly.

    Don't you love it when you can answer your own question 5 minutes later?

  3. neocoder
    Plugin Contributor

    Posted 3 years ago #

    I added a "size" parameter to the [newsman post='thumbnail'] shortcode. So, in the next version you'll be able to use one of the sizes defined by your theme, for ex. [newsman post='thumbnail' size='medium'].

  4. aWEBthatWORKS
    Posted 3 years ago #

    Wow thanks Neocoder, that's awesome! Will keep an eye out for this in the new version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic