Descripción
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.
How does the plugin work?
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.
Usage
- Adding Multiple Featured Images: When editing a post, locate the “Multiple Featured Images” meta box in the sidebar.
- Click the “Select Image” buttons to choose up to three additional featured images using the WordPress Media Library.
- Save or update your post.
Displaying Images on the Frontend:
- In your theme’s template files: Use the function
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.- Possible values: Any registered WordPress image size name (e.g.,
thumbnail
,medium
,large
,full
) or a custom image size name defined by your theme. - Default value:
thumbnail
if thesize
parameter is not specified.
- Possible values: Any registered WordPress image size name (e.g.,
-
post_id
: (Optional) Specifies which post’s featured images to display.- Possible values: The ID of a WordPress post.
- Default value: If
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 thethumbnail
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 themedium
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 ID123
, using the defaultthumbnail
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 ID456
, using thelarge
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”.
-
Capturas
Instalación
- Install and activate the plugin from your WordPress Admin Dashboard.
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to edit any Post (or Page, or any public post type). You will find a “Multiple Featured Images” meta box on the sidebar.
Preguntas frecuentes
-
Is there a limit to the number of additional featured images?
-
Yes, by default, you can add up to three additional featured images per post using this plugin. This limit can be customized in the plugin code if needed.
-
How do I display the multiple featured images on my website?
-
You can display the images either by using the
b7mufeimdisplaymultiplefeatured_images()
function in your theme’s template files or by using the[b7_multiple_featured_images]
shortcode in your post content or widgets. See the “Usage” section for details. -
Will this plugin slow down my website?
-
No, this plugin is designed to be lightweight and efficient. It only adds a small amount of meta data to your posts and retrieves it when displaying the images. The impact on website loading speed should be minimal.
Reseñas
No hay reseñas para este plugin.
Colaboradores y desarrolladores
“B7 Multiple Featured Images for Post” es un software de código abierto. Las siguientes personas han colaborado con este plugin.
ColaboradoresTraduce “B7 Multiple Featured Images for Post” a tu idioma.
¿Interesado en el desarrollo?
Revisa el código , echa un vistazo al repositorio SVN , o suscríbete al log de desarrollo por RSS .
Registro de cambios
1.0.0 – Release Date 17th Mar 2025
Initial release.
– Allows adding up to 3 additional featured images to posts.
– Meta box in post edit screen for image selection.
– b7mufeimdisplaymultiplefeatured_images()
function for theme integration.
– [b7_multiple_featured_images]
shortcode for displaying images in content.
– Basic frontend CSS styling.