Multiple featured images in WordPress post/page

Ever had a scenario where you had the need for more than one featured images attached with a post type in WordPress? Well, i did. And the obvious solution seemed attaching images to the post in question through Media Library. But that seemed like too much of an effort for the client and frankly this is one of those frustrating things about WordPress where you feel like this CMS should have this feature shipped with the core. But unfortunately, it doesn’t.

So what i needed done was a fix no of images available with the post as attachment. I googled up a bit found this incredible plugin:

Multiple Featured Images  

Only setup you need other than installing and activating plugin is to put the following code in the functions.php of your theme:

Here you pass the arguments in the kdMultipleFeaturedImages function provided by the plugin. Using the above arguments and instatiations you can have multiple featured image meta boxes in the post/page edit/add page of WordPress. For instance if you need another featured image box just add another instance like the one above with the id as featured-image-3 and change the other arguments appropriately.

To fetch the featured image just addthe following code:

More functions of the plugin can be found at the official plugin FAQ page:

https://wordpress.org/plugins/multiple-featured-images/faq/

alexey

Application developer, movie buff, occasional reader and a huge Manchester United fan.
alexey
Share

Application developer, movie buff, occasional reader and a huge Manchester United fan.