Thanks a lot 🙂
It’s working.
One closing parenthesis is missing on code. It should be –
<?php
$post_id = get_the_ID();
if ( ! empty( wp_review_get_post_review_type( $post_id ) ) ) {
echo do_shortcode('[wp-review id="' . $post_id . '"]');
} else {
echo 'No reviews available.';
}
Hi, I want to integrate WP review in my theme custom position using [wp-review id]
but I want it with some logic like this, because If I set it “No Review”
<?php
$post_id = get_the_ID();
if(isset( Which function/parameter should I use here? )){
echo do_shortcode(“[wp-review id=\”{$post_id}\”]”);
}
else{
echo “No reviews available”;
}
?>