WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostRatings
[resolved] Rating just one category? (3 posts)

  1. WayneM1
    Member
    Posted 3 years ago #

    How can I add the rating capability to just one category?

    I'm guessing I would have to edit my post.php page to insert the code:

    <?php if(function_exists('the_ratings')) { the_ratings(); } ?>

    And use some other function of the codex to only execute that code if the post is a certain category id.

    Anyone know how I can do that?

    Thanks.

  2. WayneM1
    Member
    Posted 3 years ago #

    I think I figured this out on my own...

    <?php if(function_exists('the_ratings') && in_category(xx) ) { the_ratings(); } ?>

    This seems to work :-)

    Just change "xx" to the id of the category you want the rating system to show on.

  3. raman631
    Member
    Posted 3 years ago #

    which plugin r u using ??is the above code inserted in post.php??

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic