"Multiple Featured Images" meta box in the post edit sidebar.
The “B7 Multiple Featured Images for Post” plugin for WordPress allows you to go beyond the single featured image limitation. This plugin empowers you to add up to three additional featured images to your posts, providing a richer visual representation of your content. Display these images on your posts using a simple function call in your theme or via a convenient shortcode.
This plugin extends the functionality of WordPress posts by adding a meta box in the post edit screen. This meta box allows you to select up to three additional images using the standard WordPress media uploader. These images are then stored as post meta data, which can be retrieved and displayed on the front-end of your site.
Displaying Images on the Frontend:
b7mufeimdisplaymultiplefeatured_images( get_the_ID(), 'medium' ); in your theme’s template files (e.g., single.php, content.php). Replace 'medium' with your desired image size (thumbnail, medium, large, full, or custom sizes).Using Shortcode: Use the shortcode [b7_multiple_featured_images] within your post content or widgets to display the multiple featured images.
Shortcode Parameters:
The [b7_multiple_featured_images] shortcode accepts the following optional parameters to customize its output:
size: (Optional) Defines the image size to be displayed.
thumbnail, medium, large, full) or a custom image size name defined by your theme.thumbnail if the size parameter is not specified.post_id: (Optional) Specifies which post’s featured images to display.
post_id is not specified, the shortcode will display multiple featured images for the current post where the shortcode is used.Shortcode Usage Examples:
Here are various ways to use the shortcode:
Basic Usage (Default Thumbnail Size, Current Post):
[b7_multiple_featured_images]
This will display the multiple featured images of the current post, using the thumbnail image size for each image.
Specify Image Size (Medium Size, Current Post):
[b7_multiple_featured_images size="medium"]
This will display the multiple featured images of the current post, using the medium image size. You can replace "medium" with other sizes like "large" or "full".
Specify a Post ID (Thumbnail Size, Specific Post):
[b7_multiple_featured_images post_id="123"]
This will display the multiple featured images of the post with ID 123, using the default thumbnail image size. Replace "123" with the actual ID of the post you want to target.
Specify Both Size and Post ID (Large Size, Specific Post):
[b7_multiple_featured_images size="large" post_id="456"]
This will display the multiple featured images of the post with ID 456, using the large image size. Replace "456" with the desired post ID and "large" with your preferred image size.
Using in Widgets: You can directly paste any of the above shortcode examples into a WordPress Text widget to display multiple featured images in your sidebar or other widget areas. Remember that in most cases in widget areas, you would likely want to specify a post_id to display images from a specific post, rather than relying on “current post”.