Support » Plugin: Site Reviews » how to change the number of limit for rating?

  • Resolved vidalpt

    (@vidalpt)


    Hi there.

    I want to change the number of limit for rating to three(whatever number I want).
    How can I make it possible?

    Thanks.

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

    (@geminilabs)

    You can use the “rating” shortcode option to limit reviews shown to a minimum rating (i.e. only show reviews with a 3-star rating or higher: [site_reviews rating=3]

    To change the max number of stars from 5 to something else, please see:

    https://wordpress.org/support/topic/score-count-up-to-10-instead-of-5/#post-12266247

    (If you are using Site Reviews v4.3.1 or higher, then you can ignore the first point in the link provided above.)

    Thread Starter vidalpt

    (@vidalpt)

    sorry for making you confused about my question.

    I was trying to say, there is good feature that a user can leave only one ‘review’ according to email or ip address. And I’d like to change the number of review limit.

    And, is there anyway to allow users to edit their reviews within particular time? for example, the user can edit only within 3 days or whatever.

    Thank you always for quick responses.

    Plugin Author Gemini Labs

    (@geminilabs)

    1. You can change the review limit to 3 like this:

    /**
     * Change the Review limit to 3
     *
     * @param bool $result
     * @param array $reviews
     * @return bool
     */
    add_filter('site-reviews/review-limits/validate', function ($result, $reviews) {
        if (count($reviews) < 4) {
            return true;
        }
        return $result;
    }, 10, 2);

    2. Currently, only users with the permission to edit others posts can edit reviews (i.e. the Editor role).

    Thread Starter vidalpt

    (@vidalpt)

    Thank you so much. It works well.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to change the number of limit for rating?’ is closed to new replies.