WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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);
} ?>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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