Echo the amount of reviews.

This topic contains 7 replies, has 2 voices, and was last updated by  Giri 7 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #386383

    Richard Davies
    Buyer
    Post count: 118

    Hey, just wondering how I can echo the amount of reviews a certain listing has.

    #386541

    Giri
    Expired Member
    Post count: 3155
    
    
    global $post;
    echo geodir_get_review_count_total($post->ID);
    #386546

    Richard Davies
    Buyer
    Post count: 118

    Thank you 🙂

    #386552

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

    #387274

    Richard Davies
    Buyer
    Post count: 118

    Hey Giri,

    Just an update on this, it does show the amount of reviews, but if there arent any, it just doesn’t show a number. ideally it needs to show 0 reviews

    Cheers

    #387288

    Giri
    Expired Member
    Post count: 3155

    Hi Richard you use to use if else loop for that.

    
    
    global $post;
    $count = geodir_get_review_count_total($post->ID);
    if ($count) {
       echo $count;
    } else {
       echo "0 Reviews";
    }
    #387300

    Richard Davies
    Buyer
    Post count: 118

    Cheers it worked perfectly

    #387304

    Giri
    Expired Member
    Post count: 3155

    You are welcome.

Viewing 8 posts - 1 through 8 (of 8 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount