Get review ID or review object inside template file

[ad_1]

Which template file?

Please explain a little more about what you are trying to do and where.

in any template file, for example in review.php. Can I somehow get review_id in templates ? I want get rating for review, and display only one star with that rating. I am able to query db, your custom table with ratings, I need only review_id

You can access the $review object directly in the review.php template. I asked which template because the review object is not available in all templates.

For example:

echo $review->ID;

echo $review->rating;

glsr_debug($review);

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer