The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to manually ins...
Clear all

How to manually insert a rating into a template via PHP?

4 Posts
4 Users
0 Reactions
Posts: 1
Topic starter
New Member
Joined: 4 years ago

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(); ?>
<div id="placeratings">
<?php getPostRatingHtml(); ?>

This function does not work.

3 Replies
Posts: 7325
Illustrious Member
Joined: 7 years ago


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. 

1 Reply
Joined: 3 years ago

New Member
Posts: 1

@asti, hello. Could you please help me out with what needs to be done to get the rating values for each post from the DB?



Posts: 1
New Member
Joined: 3 years ago

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