[Plugin: Multiple Post Thumbnails] A feature suggestion
-
Hi,
Just a feature suggestion..
When the preview is rendered it tries to pick a custom thumbnail size
"{$this->post_type}-{$this->id}-thumbnail"
then default to a hard coded value.I think it would make sense to fall back to the default post behaviour between the two case scenario and pick
post-thumbnail
if the first one isn’t available.Something like this works for me:
if ( isset($_wp_additional_image_sizes["{$this->post_type}-{$this->id}-thumbnail"])) $thumbnail_html = wp_get_attachment_image($thumbnail_id, "{$this->post_type}-{$this->id}-thumbnail"); elseif ( isset($_wp_additional_image_sizes["post-thumbnail"])) $thumbnail_html = wp_get_attachment_image($thumbnail_id, "post-thumbnail"); else $thumbnail_html = wp_get_attachment_image($thumbnail_id, array($content_width, $content_width));
https://www.ads-software.com/extend/plugins/multiple-post-thumbnails/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Multiple Post Thumbnails] A feature suggestion’ is closed to new replies.