WordPress.org

Ready to get started?Download WordPress

Forums

GD Star Rating
Exclude a category (2 posts)

  1. polle001
    Member
    Posted 3 years ago #

    I want to exclude a category, so the ratings dont show up there.

    Can anyone share how to exclude it ?

    I have this in my themes single.php:

    <? wp_gdsr_render_article_thumbs ($template_id=0, $read_only=false, $stars_set="", $stars_size=0, $stars_set_ie6="", $echo=true); ?>

    Thanks.

  2. erikrodne
    Member
    Posted 3 years ago #

    $cat = get_the_category();
    foreach($cat as $c) {
         if($c->name != 'this category to exclude ' && $c->name != 'that category name to exclude'){
              $showRating = true;
         }
    }
    if($showRating){
         wp_gdsr_render_article($template_id = 0,
              $read_only = false,
              $stars_set = "oxygen",
              $stars_size = 20,
              $stars_set_ie6 = "oxygen");
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic