0

I am trying to display the code <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">

Because is archive doesnt get the right product ID

In think in need to combine this code `

      global $post;
      if( get_field('review_post_id',$taxonomy . '_' . $termId) ):
      $taxonomy = get_query_var('taxonomy');
      $termId = get_queried_object()->term_id;?>`

How can i combine those codes to export the ratingValue field?

  • Why would an archive have a rating? – Jacob Peattie May 29 '18 at 2:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.