WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
[resolved] Adding Defualt Post Rating to all posts (3 posts)

  1. sakthig
    Member
    Posted 7 months ago #

    Rather than manually add rating to the blog posts,as a administrator i would like to add default post rating (say 4 stars) to all of my blog posts.Is that possible?Thanks in advance

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

  2. Lester Chan
    Member
    Plugin Author

    Posted 7 months ago #

    https://github.com/lesterchan/wp-postratings/blob/master/wp-postratings.php#L543

    Line 543:
    Replace: add_post_meta($post_ID, 'ratings_users', 0, true);
    With: add_post_meta($post_ID, 'ratings_users', 1, true);

    Line 544:
    Replace: add_post_meta($post_ID, 'ratings_score', 0, true);
    With: add_post_meta($post_ID, 'ratings_score', 4, true);

    Line 545:
    Replace: add_post_meta($post_ID, 'ratings_average', 0, true);
    With: add_post_meta($post_ID, 'ratings_average', 4, true);

    Do note that if you replace/upgrade the plugin this change will be gone

  3. sakthig
    Member
    Posted 7 months ago #

    Thanks lebester chan.i will try this

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.