Fonksiyon sayfasıyla uğraşmak istemeyenler için
<div style="display:none;" itemscope itemtype="http://data-vocabulary.org/Recipe" >
<h1 itemprop="name"><?php the_title(); ?></h1>
<img itemprop="photo" src="<?php
$metaresim = get_post_meta($post->ID, "resim", true);
if(empty($metaresim)){
echo 'http://www.site.com/yildiz.jpg';
}else{
echo $metaresim;
}
?>" />
<span itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
<span itemprop="rating"><?php echo rand(2, 8); ?></span>
<span itemprop="count"><?php echo rand(1, 55); ?></span></span>
</div>Bence bu daha kolay. Özel alandan resim anahtarı ile eklediğiniz resmi gösterir. Eğer bir resim tanımlamadıysanız site.com/yildiz.jpg resmini gösterir.
Aklıma takıldı birde bunu kullanıyoruz olmayan değerlendirmeyi var gibi gösteriyoruz. Google bunu patlatmasın kafamızda