• Resolved sroskylos

    (@sroskylo1)


    <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?

    • This topic was modified 6 years, 10 months ago by sroskylos.
Viewing 1 replies (of 1 total)
  • Plugin Author Lester Chan

    (@gamerz)

    I don’t provide support for customization.

    One is using post and one is using term ID, so there are very different.

Viewing 1 replies (of 1 total)
  • The topic ‘Display The Rating Value’ is closed to new replies.