• I’m using a theme that requires a large, featured image that takes up the left half the screen (example in provided link.) It looks great and is functional for the site’s design. But for quick posts, searching for large images can be tedious, so I use a plugin that will set a generic a featured image if one isn’t designated for the post. That works fine, but that generic image also appears on feeds, archive pages, category blocks of posts, etc.

    What I need is a way to set an additional featured image (smaller) that doesn’t replace the large left page featured image at the post level, but replaces it every place else on the site?

    Does that make sense? Happy to explain further if there are any questions. Thank you so much.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,
    Can you provide theme name?

    Thread Starter donkeydigest

    (@donkeydigest)

    Anymag

    Moderator bcworkz

    (@bcworkz)

    There’s only one possible featured image per post. However, you can request that image in any available size. Your issue, I believe, is when an adequately large image is unavailable, you want to specify a smaller alternate while still using the generic large fallback. There are various filters related to getting a featured image you could use to implement the necessary logic.

    But I recommend going about it a little differently. Set a featured image, regardless of whether it’s large enough for your theme or not. When a featured image is requested, through appropriate filters, see if a large enough size is available. If so, nothing needs to be done, proceed normally. If the available sizes are not large enough, return the fallback image that is large enough.

    For what filters are available, check the source code for get_the_post_post_thumbnail(). There will also be filters in some of the function calls like get_post_thumbnail_id() which might be useful.

    Thread Starter donkeydigest

    (@donkeydigest)

    Hey, thank you for replying. Unfortunately I live in a plugin world. ?? Not much of a coder, so my options are either the fallback image OR the custom one I set. I don’t have the skills to do it any differently.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Two featured images, choose the one WP uses for thumbnails, etc.’ is closed to new replies.