WordPress.org

Forums

WP-PostRatings
[resolved] Add default rating (3 posts)

  1. BenRacicot
    Member
    Posted 10 months ago #

    Hey Lester!
    Google is giving me an error for each page that does not yet have a rating. Can I somehow give all pages a rating in one sweep to start them off in the wild? Thanks

    https://wordpress.org/plugins/wp-postratings/

  2. Lester Chan
    Member
    Plugin Author

    Posted 10 months ago #

    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;

  3. BenRacicot
    Member
    Posted 10 months ago #

    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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.