Multiple Featured Images
Using if has_post_thumbnail with multiple featured images (4 posts)

  1. andyhoyland
    Posted 4 years ago #

    Hi there.

    I'm trying to set this plugin to display specific featured images if it has them and then fall back to the default featured image if it doesn't.

    Is there something along the lines of kd_mfi_has_featured_image that would let me do this?

    Many thanks.


  2. marcus.kober
    Plugin Author

    Posted 4 years ago #

    Hi Andy,

    there's currently nothing like a fall back yet. But it would be a good feature for the next release!

    You have to code it for yourself. Try to retrieve the ID of the featured image with kd_mfi_get_featured_image_id( 'featured-image-2', 'post' ); and if it returns nothing, than output the fall back.

    If I have the time I will update the plugin and give it a has_image feature. Perhaps there will be a fall back option too. Like this:

    kd_mfi_the_featured_image( 'featured-image-2', 'post', 'full', $fallback );

    $fallback could be:

    $fallback = '<img src="/path/file.jpg" />';

    Look out for a new version next week! ;)


  3. andyhoyland
    Posted 4 years ago #

    Thanks Marcus - and for the speedy response.

    I think I've cobbled something together - I'll post it up when it's tidy! And I'll keep a look out for the new version!

    Many thanks.

  4. lupi73
    Posted 4 years ago #

    An example??? What looks like this plugin activate???
    thank you

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Multiple Featured Images
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic