Support for NextGen Gallery
-
When featured image of a post was taken from NextGen Gallery, this plugin returned an empty string in twitter:image property.
I managed to get it working (per this article) by replacing:
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );
with:
$id = get_post_thumbnail_id(); if(stripos($id,'ngg-') !== false && class_exists('nggdb')){ $nggImage = nggdb::find_image(str_replace('ngg-','',$id)); $thumb = array( $nggImage->imageURL, $nggImage->width, $nggImage->height ); }else{ $$humb = wp_get_attachment_image_src($id,'full', true); }
Would you consider adding this to your plugin for future?
It would require a bit more work for gallery cards, I guess…
https://www.ads-software.com/extend/plugins/jm-twitter-cards/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Support for NextGen Gallery’ is closed to new replies.