WordPress.org

Ready to get started?Download WordPress

Forums

itemprop WP for SERP/SEO Rich snippets
[resolved] MOD for NextGen Gallery users (5 posts)

  1. indevd
    Member
    Posted 1 year ago #

    As a NextGen Gallery user, I encountered a problem showing my image URL for post where postthumbnail was not uploaded to the WP media gallery but picked from the NextGen Gallery. After a thorow research, I figured out how to get it work also in such cases by slightly modifying itempropwp.php.

    if (function_exists('has_post_thumbnail')) {
    					if ( has_post_thumbnail($post->ID)) {
    						function get_image_path() {
    							 global $post;
    							 $id = get_post_thumbnail_id();
    							 if(stripos($id,'ngg-') !== false && class_exists('nggdb')){
    							 $nggImage = nggdb::find_image(str_replace('ngg-','',$id));
    							 $thumbnail = array(
    							 $nggImage->imageURL,
    							 $nggImage->width,
    							 $nggImage->height
    							 );
    							 } else {
    							 $thumbnail = wp_get_attachment_image_src($id,'full');
    							 }
    							 $theimage = $thumbnail[0];
    							 $theimage = str_replace('?uamfiletype=nggImage','',$theimage);
    							 return $theimage;
    							}
    							$ipwp_posth = get_image_path();
    						}
    				}

    http://wordpress.org/extend/plugins/itempropwp/

  2. Umbrovskis.com
    Member
    Plugin Author

    Posted 1 year ago #

    Will test and deploy, if this will work.

  3. Umbrovskis.com
    Member
    Plugin Author

    Posted 1 year ago #

    added in 3.3.2

  4. indevd
    Member
    Posted 1 year ago #

    Great, thanks for the prompt action!
    I was also wondering whether it should be http://schema.org/Article or http://schema.org/Blog (since wordpress is first of all a blog) or? What do you think?

  5. Umbrovskis.com
    Member
    Plugin Author

    Posted 1 year ago #

    well, Blog is about blog posting ( http://schema.org/BlogPosting ) which is part of Article anyway :)

    If there gonna be an more requests about this feature, will make as an option

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic