How-to and Troubleshooting
4
Posts
4
Users
0
Reactions
1,285
Views
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:
<header>
<h1>
<?php the_title(); ?>
</h1>
<div id="placeratings">
<?php getPostRatingHtml(); ?>
</div>
</header>
This function does not work.
3 Replies
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