WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
How to remove percentage numbers after comma? (2 posts)

  1. chillmen
    Member
    Posted 2 years ago #

    Hi,
    I use the percentage to display ratings.
    The percentage displays like this 100,00
    How to remove comma and numbers after it?
    Thanks

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

  2. chillmen
    Member
    Posted 2 years ago #

    Fix it,
    Find this lines: or just change the number 2 to 0
    $post_ratings_percentage = round((($post_ratings_score/$post_ratings_users)/$ratings_max) * 100, 2);
    Change it to:
    $post_ratings_percentage = round((($post_ratings_score/$post_ratings_users)/$ratings_max) * 100, 0);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.