WordPress.org

Ready to get started?Download WordPress

Forums

HungryFEED
thumbnail / image as item field (4 posts)

  1. HFman
    Member
    Posted 2 years ago #

    Hi,
    I'm trying to make a template so I can place the description and the title around the feed's thumbnail/image as I please. As it seems the thumbnail is mixed with the desscription.

    I saw the embeded thumbail post, but that deals with a different issue.

    How can I get the thumbnail by itself as an editable field? I need to be able to resize or apply css only to the thumbnail.

    Thanks

  2. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    I have a tutorial video up at the bottom of this page that explains how you can use CSS selectors to isolate parts of the description field. It can be a little complicated but if you know CSS then it's not too bad:

    http://verysimple.com/2011/03/08/hungryfeed-rss-description-transformation-feature/

    The difficult part about it as you know is that anything inside the description field is basically free-for-all HTML and so it requires a bit of programming logic to pluck those pieces out.

  3. HFman
    Member
    Posted 2 years ago #

    Thank you for your VERY prompt response.
    for my specific situation what I ended up doing to separate images from the feed was using the following code based on your suggestion:

    <img src="{{select(attr:src).img:first}}">

    I tried to only use the selector without inclosing it into the img tag, and I wasn't able to get it to work that way.

    You are right; each situation is different, it takes some trial and error to take 'description' a part for what's needed.

    Would it be possible to add more template fields, OR perhaps to make the shortcode to accept selectors to acomodate different situations?

    Thanks much for your help and the great plugin.

  4. Jason
    Member
    Plugin Author

    Posted 2 years ago #

    yep, that's exactly the way to include an image. if you wanted to grab another image, say the 2nd image you could use for example: <img src="{{select(attr:src).img:eq(1)}}">

    if you are talking about other fields in the feed - check out the "data" array (there is an example on the settings page). That will allow you to grab any field in the feed - even if they are "extra" fields not part of the standard RSS specification.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags