• Resolved EvelynWaugh

    (@wsjrcatarri)


    I am trying to change star-rating template but I need more information about review, so I would like to use function glsr_get_review inside template file, but how I can get review_id as argument ? I tried {{review_id}} assign to php variable but without success.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Which template file?

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

    • This reply was modified 2 years, 4 months ago by Gemini Labs.
    Thread Starter EvelynWaugh

    (@wsjrcatarri)

    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

    Plugin Author Gemini Labs

    (@geminilabs)

    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 reply was modified 2 years, 4 months ago by Gemini Labs.
    Thread Starter EvelynWaugh

    (@wsjrcatarri)

    oh thanks, very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Get review ID or review object inside template file’ is closed to new replies.