Display The Rating Value
-
<meta itemprop="name" content="<?php woocommerce_page_title(); ?>"><meta itemprop="ratingValue" content="<?php echo get_post_meta( get_the_ID(), 'ratings_score', true ); ?>"><meta itemprop="worstRating" content="0"><meta itemprop="bestRating" content="5">
Its an custom post archive
I use this code to display the rating
<?php global $post; if( get_field('review_post_id',$taxonomy . '_' . $termId) ): $taxonomy = get_query_var('taxonomy'); $termId = get_queried_object()->term_id; echo do_shortcode('[ratings id="'.get_field('review_post_id', $taxonomy . '_' . $termId).'"]');?>
How can i modify the following code
<meta itemprop="ratingValue" content="<?php echo get_post_meta( get_the_ID(), 'ratings_score', true ); ?>">
to show the number?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Display The Rating Value’ is closed to new replies.