Skip to content

World Of Nubcraft

  • :~$ About
  • ?? Answers
  • All of the Linux that you can chew
  • Android: Billions served
  • Fresh from the official Ubuntu blog
  • What’s going on @ Planet Ubuntu
  • Zeroing In

Recent Posts

  • View what’s inside the Keystore March 31, 2021
  • How to fix error: snap “telegram-desktop” has “install-snap” change in progress March 17, 2021
  • Change default app to open torrent magnet link March 11, 2021
  • Base64-encoded value is slightly different at the end of string February 16, 2021
  • There any free, lightweight app to merge PDF files as one? January 6, 2021

Tags

  • Apache Kafka (1)
  • Avro (2)
  • clipboard (1)
  • clipboard manager (1)
  • copy-paste (1)
  • deserialize (2)
  • foobar (1)
  • gradle (1)
  • haiku (1)
  • HAL (1)
  • HATEOAS (1)
  • hibernate (1)
  • IntelliJ (1)
  • jackson2 (2)
  • JPA (1)
  • linux (1171)
  • ms sql (1)
  • ms sql server (1)
  • no highlight (1)
  • no select (1)
  • not404 (1)
  • openshift secrets (1)
  • operating systems (1171)
  • poem (1)
  • Producer/Consumer (2)
  • programming (1171)
  • Pub/Sub (2)
  • redhat (1)
  • Serializable (1)
  • serialization (1)
  • serialVersionUID (1)
  • servers (1171)
  • snap app (2)
  • software engineering (1171)
  • spring boot (1)
  • sql query (1)
  • technology (1171)
  • ubuntu (1171)
  • unity dash (1)
  • unity desktop (2)
  • unity launcher (1)
  • unix (1171)
  • unmarshal (2)
  • windows version (1)
  • wordpress (1)

Archives

  • March 2021 (3)
  • February 2021 (1)
  • January 2021 (1)
  • December 2020 (6)
  • November 2020 (2)
  • October 2020 (5)
  • September 2020 (90)
  • August 2020 (314)
  • July 2020 (306)
  • June 2020 (299)
  • May 2020 (168)
  • October 2019 (1)
  • May 2019 (1)

Show the “ratingValue” and “ratingCount” values ​of KK Star Ratings Plugin

I want to display the “ratingValue” and “ratingCount” values ​​generated by the KK Star Ratings plugin (Github).

I made a JSON-LD SoftwareAplication and here is the code I use in function.php:

add_action('wp_head', 'add_jsonld_head', 1);
function add_jsonld_head() {
    if ( is_single() ) {
        ?>
        <script type="application/ld+json">
            {
      "@context": "http://schema.org/",
      "@type": "SoftwareApplication",
      "@id": "<?php echo get_permalink( get_option( 'page_for_posts' ) ); ?>",
      "softwareVersion": "<?php the_field('versi_terbaru'); ?>",
      "operatingSystem": "Windows",
      "applicationCategory": "<?php the_field('kategori'); ?>",
      "dateModified": "<?php the_modified_time('c'); ?>",
      "name": "<?php the_title(); ?>",
      "aggregateRating": {
        "@type": "AggregateRating",
        "name": "<?php the_title(); ?>",
        "ratingValue": "",
        "ratingCount": "",
        "bestRating": "5",
      },
      "publisher": {
        "@type": "organization",
        "name": "<?php the_title(); ?>"
      },
      "offers": {
        "@type": "Offer",
        "price": "0",
        "priceCurrency": "IDR"
      },
      "image":{
        "@type": "ImageObject",
        "url": "<?php the_post_thumbnail_url(); ?>",
        "width": "100",
        "height": "100"
      }
    }
        </script>
        <?php
    }
} 

How do I get the ratingValue and ratingCount values ​​from KK Star Ratings?

I have played around with this plugins but sadly my coding skills are not that good so I couldn’t figure out how to modify it. I would really appreciate any help I can get on this.

Go to Source
Author: Renomu Reza

Posted on June 13, 2020Author markCategories json, plugins, post-meta, ratingTags linux, operating systems, programming, servers, software engineering, technology, ubuntu, unix

Post navigation

Previous Previous post: Does dumping/restoring do the same with “vacuum full”?
Next Next post: Setenv error, even though I’m using bash
Proudly powered by WordPress