Dieses Plugin ist nicht mit den jüngsten 3 Hauptversionen von WordPress getestet worden. Es wird möglicherweise nicht mehr gewartet oder unterstützt und kann Kompatibilitätsprobleme haben, wenn es mit neueren Versionen von WordPress verwendet wird.

Dynamic Featured Image

Beschreibung

Dynamically adds multiple featured image or multiple post thumbnail functionality to your page, posts and custom post types. This plugin provides you an interface to add any number of featured image as you want without writing a single line of code. These featured images can then be collected by the various theme functions.

Overview

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.

A NOTE ABOUT SUPPORT: We’re here to help troubleshoot bugs, but please don’t set expectations early as the support forums at WordPress.org are only checked once in a while.

How it works?
1. After successfull plugin activation go to add or edit page of posts or pages and you will notice a box for second featured image.
2. Click Set featured image, select required image from „Dynamic Featured Image – Media Selector“ popup and click Set Featured Image.
3. Click on Add New to add new featured image or use Remove link to remove the featured image box.
4. You can then get the images by calling the function $dynamic_featured_image->get_featured_images([$postId (optional)]) in your theme. (Click here for details)
5. The data will be returned in the following format.

array
  0 => 
    array
      'thumb' => string 'http://your_site/upload_path/yourSelectedImage.jpg' (length=50)
      'full' => string 'http://your_site/upload_path/yourSelectedImage_fullSize.jpg' (length=69)
      'attachment_id' => string '197' (length=3)
  1 => 
    array
      'thumb' => string 'http://your_site/upload_path/yourSelectedImage.jpg' (length=50)
      'full' => string 'http://your_site/upload_path/yourSelectedImage_fullSize.jpg' (length=69)
      'attachment_id' => string '198' (length=3)
  2 => ...

Resources
1. Detail Documentation.
2. StackOverflow Tag.

MultiSite Info
You can use Network Activate to activate plugin for all sites on a single install. It is only available on the Network admin site not anywhere else.
Simple Activate activates for the site you are currently on. These will be permitted to be activated or deactivated on ANY blog.

While deleting the plugin from the Network be sure that the plugin is deactive in all installation of your WordPress network.

Contribute
If you’d like to check out the code and contribute, join us on Github.
Pull requests, issues, and plugin recommendations are more than welcome!

Screenshots

  • New featured image box.
  • Selecting image from media box.
  • Add new featured image box.

Installation

  1. Unzip and upload the dynamic-featured-images directory to the plugin directory (/wp-content/plugins/) or install it from Plugins->Add New->Upload.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. 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 the Featured Image 2 box is selected.

FAQ

1. The media uploader screen freezes and stays blank after clicking insert into post?

The problem is usually due to the conflicts with other plugin or theme functions. You can use general debugging technique to find out the problem.

i. Switch to the default wordpress theme to rule out any theme-specific problems.
ii. Try the plugin in a fresh new WordPress installation.
iii. If it works, deactivate all plugins from your current wordpress installation to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
iv. Resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

2. There is no additional image on the page when I save it or publish it?

This happens when there is any problem in saving you post or page properly. For example, if you try to save or publish the post without the post title the featured images may not be saved properly.

3. Can I set the image from remote url?

If you need to add images from the remote url you need to switch back to ver. 2.0.2 . There is no such feature in ver. 3.0.0 and above.

Note: If you are using remote url to use the feature image, the helper functions may not work properly.
Alt, caption and title attribute for these images cannot be retrieved using helper functions. NULL is returned instead.

4. I cannot add or change secondary featured images after update?

This usually happens because of cache. Clear all your cache and try again if you are having this problem. If you still have such problem you can get help through support forum.

5. Is it possible to make DFI work only for certain post types?

Yes! It is easily possible from version 3.1.13. A filter is added in the recent version for this purpose.

Please feel free to report any bug found at
https://github.com/ankitpokhrel/Dynamic-Featured-Image/.

Rezensionen

9. April 2021
I got the free version working perfectly last night with WordPress 5.7. The description says the plugin will "add any number of featured images ... without writing a single line of code", which is a bit misleading. The plugin provides a GUI interface to flag images as featured, but to actually have the images appear on your site you need to write some code. Stack Overflow to the rescue. I found this snippet there and got it working: if( class_exists('Dynamic_Featured_Image') ) { global $dynamic_featured_image; $featured_images = $dynamic_featured_image->get_featured_images( ); //print_r($featured_images); //You can now loop through the image to display them as required foreach($featured_images as $featured_image) { echo "<img src='".$featured_image['full']."'>"; } } Detailed instructions for those who, like me, don't know PHP at all: Go to Appearance/Theme Editor Double click on the part of the site you want to add featured images. This will probably be 'Single Page' or 'Single Post', but it could be 'Theme Header', 'Theme Footer', or whatever. For most pages, you'll want to paste the above code into 'the loop'. If you don't know what 'the loop' is, it's worth looking in to, as it's probably a bit different on different themes. On most themes, pasting the code anywhere between while (have_posts()): the_post(); and endwhile; should work. But where you put it in relation to other things in 'the loop' probably matters. Note that everything between the quotes, after the word 'echo' in the code above is what will appear on your page. So any other stuff you want to add (list items, div tags, etc.) needs to go in there. If you're adding any attributes, use single quotes or your whole site will bork. Have fun! Hope that helps. And thank you, Ankit, for a great plugin!
3. Dezember 2018
This is a poorly documented, poorly coded half-done plugin. The plugin, if you read the fine print, assumes you would go to a github page, and follow vague instructions on what functions you need to call in your theme... as if this is something that the average user can do. It is a great idea to show many featured images... it is a pitty you have a be a coder, to create your child-theme and hack it to get this to work.
16. September 2018
DO NOT purchase the Pro version of this plugin. It does not work as described and has terrible documentation. Emails sent asking for a refund have been ignored. Looking though the support forum I can also see that support for this plugin is non-existent. These guys don't care about their customers or the quality of their work.
5. September 2018
word of advice for those looking to buy the pro version... don't!! Truly a master piece in terms of terrible development and documentation.. I am in awe......
23. September 2016
This is exactly what I needed so that my client could add multiple images to a custom post. I'm able to customize the template and it all works perfectly.
Alle 57 Rezensionen lesen

Mitwirkende & Entwickler

„Dynamic Featured Image“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„Dynamic Featured Image“ wurde in 13 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „Dynamic Featured Image“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

3.7.0

  • Feature: Auto-select media on open (#78)
  • Fix: Attachment ID issue for edited image (#77, #80)

3.6.8

  • Fix slow query issue (#74, Thanks @tobros91)
  • Add German translations (#69, Thanks @swiffer)
  • Correct Swedish translations (#72, Thanks @S8nsick66)
  • Add sponsors

3.6.5

  • Add Thai translations (#63, Thanks @isudnop)
  • Fix warning when counting empty string in PHP 7.2 (#66, Thanks @zsmartin)
  • Show only images in media selector (#67, Thanks @zsmartin)
  • Add filters for metabox context and priority (#68, Thanks @zsmartin)

3.6.1

  • Remove short array syntax to support php <= 5.4.

3.6.0

  • Various security fixes.
  • Missing text domains fixes.
  • Dashicons css removed as it is no longer needed.
  • Numerous WordPress coding standard improvements.

3.5.2

  • Fix image url if image already points to CDN. PR #50
  • Internal refactorings

3.5.1

  • Minor code refactorings.

3.5.0

  • Unit Tests.
  • Added support for github updater. Issue #44
  • Fix get_the_ID issue in WordPress below 4.0.
  • Remove extra quotation mark that was making the html invalid.
  • Added uninstall script.

3.4.0

  • Added Link to Image field.
  • Portuguese Brazilian translation (Thanks to @bruno-rodrigues).
  • And some minor refactorings.

3.3.1

  • Increased code quality

3.3.0

  • Fixed Invalid image path returned – Pull Request #35
  • Added dfi_post_type_user_filter to disable metabox in post types.
  • Added filter to change metabox title.
  • Some minor fixes.

3.1.13

  • Added post types filter – Pull Request #32
  • Fixed issue #33 – Incorrect data return when no image attached.
  • Fixed issue #34 – Problem Retrieving Images in HTTPS Protocol.
  • Revised code quality.
  • Added Italian translation.

3.1.9

  • Changed the scope of function get_image_id()
  • Fixed typo in Nepali translation.

3.1.7

  • Added Nepali, Swedish, Hebrew, Serbian, Croation and Bosnian languages.
  • Fixed bug on issue #25 solution.
  • Various code quality improvements.

3.1.2

  • Fixed issue #25.

3.1.0

  • Partial fix for issue #22.
  • Increased code quality.

3.0.1

  • Fixed several JSLint issues

3.0.0

  • Fully Object Oriented (Thanks to @cfoellmann).
  • New WordPress Media Uploader.
  • Uses dashicons instead of images.
  • Functions to retrieve image descriptions and nth featured image.
  • Well documented.

2.0.2

  • Minor css fix (issue #18 in GitHub, Thanks to @cfoellmann)

2.0.1

  • Change in design.

2.0.0

  • Now with various helper functions.
  • Helpers to retrieve alt, title and caption of each featured image.
  • Added support for remote url.
  • WordPress 3.7 compatible.
  • Primarily focused on theme developers.

1.1.5

  • Fixed PHP Notice issues in strict debugging mode (Issue #4 in GitHub, Thanks to @Micky Hulse).
  • Added post id in media upload box.
  • Enhanced MultiSite Support.

1.1.2

  • Resolved media uploader conflicts.

1.1.1

  • Fixed a bug on user access for edit operation.

1.1.0

  • Major security update
  • Now uses AJAX to create new featured box

1.0.3

  • First stable version with minimum features released.
  • Fixed bug for duplicate id.
  • Updated dfiGetFeaturedImages function to accept post id.
  • Fixed some minor issues.