For No Review Listings how can we hide the "No Reviews" link

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

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

Open Support Ticket
  • Author
    Posts
  • #401276

    Alphonso
    Buyer
    Post count: 297

    Hi guys,
    In a Listing is there a way to Hide the ” – No Reviews” words/link next to the stars, if there are no reviews left by anyone?
    Example:
    If 1 user leaves a review it will display: “***** – 1 Review”
    But if no reviews I want it to display: “*****          ”
    Please advise.
    Thanks!

    #401315

    Kor
    Moderator
    Post count: 16516

    Hi Alphonso,

    Unfortunately, achieving this would require customization. But I’ll forward this to a developer for a second opinion.

    Thanks!

    #401318

    Kiran
    Moderator
    Post count: 7069

    Hi

    Add following code snippet via any snippet plugin.

    
    
    function _gd_custom_hide_no_review_text( $class ) {
        global $post;
        if ( empty( $post->rating_count ) ) {
            $class .= 'gd-custom-no-review';
        }
        return $class;
    }
    add_filter( 'geodir_post_view_article_extra_class', '_gd_custom_hide_no_review_text', 10, 1 );

    Then add following css to GeoDirectory > Design > Scripts > CSS scripts

    
    
    .gd-custom-no-review .geodir-entry-meta a.geodir-pcomments {
        display: none !important;
    }

    Kiran

    #401430

    Alphonso
    Buyer
    Post count: 297

    You guys rock!
    Kor…Thanks for facilitating this!
    Kiran…Your code worked perfectly!
    Thanks for the awesome support! 🙂

Viewing 4 posts - 1 through 4 (of 4 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