• I think I’ve looked through all FAQ and other suggested solutions and code snippets, but I can’t seem to find a way to prevent ratings from loading in a specific page or post.

    Can you tell me how I can avoid the ratings from loading on a specific post or page (other than by hiding it via CSS)?

    Would you consider adding a checkbox that shows up in each post/page edit window to “do not display wp-ratings on this post”

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Lester Chan

    (@gamerz)

    You can use conditional WordPress tags like is_page(), is_category() to check.
    For example, if you want to show the ratings on post id 149, you can do something like that:

    
    <?php if ( get_the_ID() === 149 ) : ?>
    <?php the_ratings(); ?>
    <?php endif;?>
    

    Nope, I don’t think I will be adding in any checkboxes.

    Thread Starter Oscar Gonzalez

    (@rakxzo)

    Thanks Lester, but I think I didn’t explain myself. I am looking for an easy way to make an exception, not a rule. Where most of the posts display the ratings as it does now, but I want to exclude a specific post once in a while. So I don’t want to show the ratings… they’re already showing, I’m looking to exclude the rating on a given post.

    Giving the user an easy way to do this would make it a lot more user friendly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Avoid ratings on specific page or post’ is closed to new replies.