-
Notifications
You must be signed in to change notification settings - Fork 32
Home
Ankit Pokhrel edited this page Oct 16, 2013
·
23 revisions
Dynamic Featured Image enables the option to have MULTIPLE featured images within a post or page. This is especially helpful when you use other plugins, post thumbnails or sliders that use featured images. Why limit yourself to only one featured image if you can do some awesome stuffs with multiple featured image? DFI allows you to add different number of featured images to each post and page that can be collected by the various theme functions.
- Unzip and upload the
dynamic-featured-images
directory to the plugin directory (/wp-content/plugins/
) or install it fromPlugins->Add New->Upload
- Activate the plugin through the
Plugins
menu in WordPress. - If you don't see new featured image box, click
Screen Options
in the upper right corner of your wordpress admin and make sure that theFeatured Image 2
box is selected.
- How it works?
- Retrieving images in a theme
- Getting image title, alt and caption attributes
- Helpers/Utility functions
- dfi_get_image_id( $image_url )
- dfi_get_image_thumb( $image_url, $size )
- dfi_get_image_url( $attachmentId, $size = "full" )
- dfi_get_image_title( $image_url )
- dfi_get_image_title_by_id( $attachmentId )
- dfi_get_image_caption( $image_url )
- dfi_get_image_caption_by_id( $attachmentId )
- dfi_get_image_alt( $image_url )
- dfi_get_image_alt_by_id( $attachmentId )
- dfi_get_post_attachment_ids( $postId )
- dfi_is_attached( $attachmentId, $postId )