WordPress.org

Ready to get started?Download WordPress

Forums

Display First Image from Post and Fallbacks (2 posts)

  1. jw60610
    Member
    Posted 2 years ago #

    Hello,

    Here's the situation:

    I'm using the sitewide tags plugin to display posts from sub blogs on a main, or "tags" blog.

    In my network installation, in the main blog, using the SWT plugin, I want to display a loop of images (and the title and some meta info, but I understand how to do that) from posts in my sub blogs. I want the loop to display the post thumbnail first, if that's available. If that's not available I would like it to pull the first image. If that's not available I would like it to pull the avatar. If none of these are available, then I don't want the post to display.

    Here's the thing. I've seen solutions to some of the individual things I'm looking for, but haven't seen any with these fallbacks. Also, I'm using a grid with some pretty tight parameters, so I created a post thumbnail size to fit. I don't understand how to also get either the first image or avatar to also size and crop correctly.

    I also want the images to link to the post.

    Hope this all makes sense.

    Thanks very much!

    JW

  2. It makes sense, but it's really complicated and in depth work (and much to do with your theme as well). It's something I'd probably hire out to do, since the if/then complications are, as you noted, pretty specific.

Topic Closed

This topic has been closed to new replies.

About this Topic