WordPress.org

Support

Support » Plugins and Hacks » [Plugin: GD Star Rating] Exclude a category

[Plugin: GD Star Rating] Exclude a category

  • 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.

Viewing 1 replies (of 1 total)
  • erikrodne
    Member

    @erikrodne

    $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");
    }
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: GD Star Rating] Exclude a category’ is closed to new replies.