disable all of the Ratings, Reviews and Favorites on my site.

This topic contains 1 reply, has 2 voices, and was last updated by  Alex Rollin 5 years ago.

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

Open Support Ticket
  • Author
    Posts
  • #518698

    stepnharp02
    Expired Member
    Post count: 17

    Hi,
    I am following the instructions on this page:
    https://wpgeodirectory.com/docs-v2/faq/common-examples/#ratings-and-favorites

    I am attempting to disable all of the Ratings, Reviews and Favorites on my site.
    I have been able to disable them from all locations except the individual Places posts.

    Q1: How do I remove the Ratings and Reviews (No Reviews) from the individual Places posts?

    Q2: I have attempted to use the following (No Reviews) CSS from the above GD link, but I am receiving the following error on the Customize – Additional CSS page:

    Unable to save due to 1 invalid setting.
    There are 19 errors which must be fixed before you can save.

    The first error is at the Function line.

    /**
    * Add CSS class to listing layout for empty rating.
    */
    function gd_snippet_hide_no_review_text( $classes, $class, $post_ID ) {
    global $gd_post;

    if ( ! empty( $post_ID ) && ! empty( $gd_post ) && ! empty( $gd_post->ID ) && $gd_post->ID == $post_ID && empty( $gd_post->rating_count ) ) {
    $classes[] = ‘gd-custom-no-review’; // CSS class
    }
    return $classes;
    }
    add_filter( ‘post_class’, ‘gd_snippet_hide_no_review_text’, 10, 3 );

    Thank you for your time and effort.
    Scott

    #518778

    Alex Rollin
    Moderator
    Post count: 27815

    Add php snippets with the code snippets plugin

    https://wpgeodirectory.com/docs-v2/faq/customizing/

    Only CSS should be placed in the customizer.

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