Thursday, 19 September 2013

does not show up

does not show up

I am trying to get some rich snipped code on my wordpress site, but I
can´t get it to work. I have got several articles that are reviews, so my
aim is to add some micro data for itemtype="http://schema.org/Review". You
can check this article for testing and see how the code shows up on the
internet browser. Notice that the bit missing on the browser is .
This is the code I have on my theme sigle_post.php file:
<!-- review box -->
<div class="reviewbox">
<div itemscope="itemscope"
itemtype="http://schema.org/Review">
<!-- Este es el nuevo título para las reviews -->
<div class="review_header">
<h3> Review:
<span itemprop="itemreviewed">
<?php $review_product =
get_post_custom_values('reviewproductthemeloy_text');
echo $review_product[0];
?></span></h3><h4> por <span
itemprop="reviewer"> <?php
$review_author =
get_post_custom_values('reviewauthorthemeloy_text');
echo $review_author[0];
?>
</span>
el <span itemprop="dtreviewed"><?php echo
get_the_date('Y-m-d'); ?></span></h4></div>
<ul class="progress-bar">
<?php
for($i=0; $i<10; $i++)
{
$rate_value =
'criteria'.$i.'themeloy_slider';
$text_value =
'criteria'.$i.'themeloy_text';
$rate =
get_post_custom_values($rate_value);
$rating_text =
get_post_custom_values($text_value);
if(!empty($rate[0]) &&
!empty($rating_text[0]) &&
$rate[0] >0)
{
?>
<li class="meter">
<div class="meter-content"
style="width:<?php echo $rate[0];
?>%"></div>
<span class="meter-title"><?php echo
$rating_text[0]; ?> <span
itemprop="rating"><span itemprop="average">
<?php echo $rate[0]; ?><meta itemprop="best"
content="100"/><meta itemprop="worst"
content="0"/>%</span></span>
</li>
<?php
}
}
?>


if(!empty($rate2[0]) && !empty($rating_text2[0]) &&
$rate2[0] >0) { ?>
<li class="meter">
<div class="meter-content"
style="width:<?php echo
themeloy_get_total_review($post_id);
?>%"></div>
<span class="meter-title"><?php _e('Total
Score', 'tl_back'); ?> <?php
echo $total_review; ?>%</span>
</li>
<?php } ?>
</ul>
<?php if($review_summer =
get_post_custom_values('review_themeloy_wysiwyg')){?>
<div class="review-summery">
<h4><?php $review_title =
get_post_custom_values('reviewtitlethemeloy_text');
echo $review_title[0]; ?></h4>
<span itemprop="summary"> <?php echo
$review_summer[0]; ?></span>
</div>
<?php }?>
<?php $userreview =
get_post_custom_values('userreviewthemeloy_checkbox');
?>
<?php if( of_get_option('user_disable_review')
== 0) { ?>
<?php if($userreview[0] == 1) { ?>
<div class="clearfix"></div>
<div class="votebox">
<div id="votecount"><img src="<?php echo
get_template_directory_uri();
?>/img/ajax-loading.gif" /> <span
class="user-rate-summery"> <?php
_e('Valoración de los lectores: ',
'tl_back'); ?> </span> <span
class="vote-per"><?php echo
themeloy_get_user_review($post_id);
?></span>% ( <span
class="vote-count"><?php echo $user_vote
=
absint(get_post_meta($post_id,'votes_count',
true )); ?></span> </div>
<span class="vote-label"><?php _e(' votos
)', 'tl_back'); ?></span>
<div id="star" data-readonly="<?php echo
themeloy_vote_response($post_id); ?>"
data-score="<?php echo
(themeloy_get_user_review($post_id) /
20); ?>" data-postid="<?php the_ID(); ?>"
data-path="<?php echo
get_template_directory_uri(); ?>/img">
</div>
</div>
<?php } } ?>
</div>
</div>
<!-- close review box -->
This is what I get on my firefox browser:
<!-- review box -->
<div class="reviewbox">
<!-- Este es el nuevo título para las reviews -->
<div class="review_header">
<h3> Review:
<span itemprop="itemreviewed">
GT Avalanche 1.0</span></h3><h4> por
<span itemprop="reviewer"> BiciReview
</span>
el <span
itemprop="dtreviewed">2013-09-16</span></h4></div>
<ul class="progress-bar">
<li class="meter">
<div class="meter-content"
style="width:90%"></div>
<span class="meter-title"> <span
itemprop="rating"><span itemprop="average">
90<meta itemprop="best" content="100"/><meta
itemprop="worst"
content="0"/>%</span></span>
</li>
</ul>
<div
class="review-summery">
<h4> Veredicto</h4>
<span itemprop="summary"> <p>Una bicicleta
que puede darnos un buen rendimiento, siempre
que no vayamos a realizar trazados muy
exigentes. Pero ten en cuenta que estamos
hablando de una bici de rango medio.</p>
<div class="clearfix"></div>
<div class="votebox">
<div id="votecount"><img
src="http://bicireview.com/wp-content/themes/themerush/img/ajax-loading.gif"
/> <span class="user-rate-summery">
Valoración de los lectores: </span>
<span class="vote-per">0.00</span>% (
<span class="vote-count">0</span> </div>
<span class="vote-label"> votos )</span>
<div id="star" data-readonly="0"
data-score="0" data-postid="1220"
data-path="http://bicireview.com/wp-content/themes/themerush/img">
</div>
</div>
</div>
<!-- close review box -->
I want to thank in advance all you for your time, and excuse me if have
not explain myself enough.
Regards
Borja

No comments:

Post a Comment