WordPress.org

Support

Support » Plugins and Hacks » WP-PostRatings » [Resolved] Add default rating

[Resolved] Add default rating

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Lester Chan

    @gamerz

    This query will only work with post that already have ratings_* custom field in them aka posts that have been created after the plugin was activated. For posts earlier than that, there is no way I can think of.

    The query below will give a rating of 5. Note that it is not tested and backup your DB before running the query.
    UPDATE wp_options SET option_value = 1 WHERE option_name = 'ratings_users' AND option_value = 0;
    UPDATE wp_options SET option_value = 5 WHERE option_name = 'ratings_score' AND option_value = 0;
    UPDATE wp_options SET option_value = 5 WHERE option_name = 'ratings_average' AND option_value = 0;

    I see, interesting question though right? I really appreciate this answer Lester, thanks for building this plugin. If there is ever anything I can do to help please reach out. Ben[AT]scientifik.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Add default rating’ is closed to new replies.
Skip to toolbar