Post Ratings
Ability to add post ratings only on posts in a category (7 posts)

  1. sledge81
    Posted 3 years ago #

    The plugin isn't much to be honest and lots of functionality is missing. It would be good if you put in the option to either A) Automatically add ratings to all posts or B) Add ratings to post only in a category or C) Manually insert the post rating option while writing a post.


  2. digitalnature
    Plugin Author

    Posted 3 years ago #

    A) Already there, by default ratings are added to all posts.

    B) There's no option for this, but it's easily possible by hooking a filter on the post_ratings_visibility tag, in which you return false if the current category is not the right one.

    C) Already implemented, you can insert the [rate] shortcode into the post to show the rating links

  3. Sebastian Cork
    Posted 3 years ago #

    While I don't mind implemented functionality that is in high demand, what really sparks my interest in this plugin is the simplicity and minimalistic approach. I just hope it won't escape it's purpose and end up "bloated with useless functionality".

    Although, on a side note it would be handy to allow manually placing the ratings in templates via a function call.

  4. sledge81
    Posted 3 years ago #

    Hi digitalnature.

    B) Can you shed some light on how to get this done.

    The plugin is lightweight I presume.. would be good if it can be properly customized to ones own site requirements.

  5. digitalnature
    Plugin Author

    Posted 3 years ago #

    For example, for the "Uncategorized" category:

    add_filter('post_ratings_visibility', 'rate_only_my_category');
    function rate_only_my_category(){
      $categories = get_the_category();
      foreach($categories as $category)
        if($category->name === 'Uncategorized') return true;
      // don't display
      return false;

    I'm hesitating to add the ability to visually choose the category context too, for the reasons SeancoJr mentioned...

  6. Sebastian Cork
    Posted 3 years ago #

    @digitalnature: No need to hesitate. You're the developer. Those are only my opinions and I was basing it off what's written in your plugin description. ;-)

  7. Stacy (non coder)
    Posted 3 years ago #

    Hi , is there a way for the same widget to be used multiple times to show results for specific cats? Does this work for MU?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Ratings
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic