Optimize SEO Image of Photoswipe Plugin

post details top
May 16th, 2015
post details top

Optimize SEO Image of Photoswipe Plugin

 

Well this plugin is great but alt and title of image’s are poorly programmed… but don’t cry babies tabutnas is here to solve this problem, haha just joke don’t hate me.

 

About SEO of images

One more thing maybe u dont know how important is that Google changed the algorithm of Pidgeot and now is a very important the images had ALT and TITLE for ranking on Google.

 

Let’s Go

Go to archive /wp/wp-content/plugins/photoswipe-masonry/photoswipe-masonry.php line 320~ and put the following coda

$image_title = $attachment->post_title;
				$image_alttext = get_post_meta($aid, '_wp_attachment_image_alt', true);
				$image_caption = $_post->post_excerpt;
				$image_description = $_post->post_content;	
				
				$output_buffer .='
				<figure class="msnry_item" itemscope itemtype="http://schema.org/ImageObject">
					<a href="'. $full[0] .'" itemprop="contentUrl" data-size="'.$full[1].'x'.$full[2].'">
				        <img src='. $thumb[0] .' itemprop="thumbnail" alt="'.$image_alttext.'" title="'.$image_title.'"  />
				    </a>
				    <figcaption class="photoswipe-gallery-caption" >'. $image_caption .'</figcaption>

Leave a Commentpost details top

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Buscador

Ofertas magictree