How to manually insert a rating into a template via PHP?
How-to and Troubleshooting
Last Post by mihaisandman 2 years ago
Dec 18, 2020 4:59 am
Hello, I want to insert a rating in the header next to the title in the template. Tell me, is there a PHP function for inserting a rating? For example:
<?php the_title(); ?>
<?php getPostRatingHtml(); ?>
This function does not work.
Dec 18, 2020 9:21 am
Could you please clarify a bit? What type of rating do you mean?
Thre are two types of ratings:
In the case of the last one, you can use the [wpdrating] shortcode.
In the case of the first one, you'll need to do some manipulations and get the data from the DB tables. If you're familiar with DB structure let us know. We'll tell you where the data are stored.
Jan 19, 2021 1:33 pm
Hello, could you help us with the function for :
we would like to display the rating in the article preview
Thank you for your feedback