My theme has a slider widget that allows the end user to select a category and it assigns the posts in that category to the slider. If a post has a featured image, its used as the background of the slide for that post.

However, there are cases where the featured image on the post itself needs to be different that the one used in the slider.

What are some options for a workaround?

Ideally, I'd like to just create a clone of the "Featured Image" panel, calling it "Slider Image". How difficult would that be?

What files do I need to clone? Any plugins that already do this?

1 Answer 1


This plugin has worked for me in the past:


Or you could create a custom field - Advanced Custom Fields makes this very easy (and for the end user too):


This could be integrated by using the traditional 'featured image' as the slider image - ie leaving <?php the_post_thumbnail(); ?> or equivalent in the loop that makes your slider. Then when displaying the post, you could check if the post has a secondary image attached, and fall back to the featured image if not. Something like this with the Advanced Custom Fields Plugin (untested code):

<?php if (!( $secondary = get_field('secondary-image'))) {
    the_post_thumbnail(); // or however you like to do it
} else {
    echo wp_get_attachment_image($secondary);
} ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.