WordPress.org

Ready to get started?Download WordPress

Forums

Post Star Rating: Removing stars from pages and feeds... (2 posts)

  1. shiv379
    Member
    Posted 6 years ago #

    To remove the voting stars from feeds and pages, open post-star-rating.php and change the function

    function PSR_show_voting_stars_filter($text) {
      global $PSR;
    
    	 return $text . $PSR->getVotingStars();
    }

    to

    function PSR_show_voting_stars_filter($text) {
      global $PSR;
    
    	if ( !is_feed() && !is_page() )
    	 return $text . $PSR->getVotingStars();
    }
  2. shiv379
    Member
    Posted 6 years ago #

    Sorry, my bad, change it to:

    function PSR_show_voting_stars_filter($text) {
      global $PSR;
    
    	//echo $PSR->getVotingStars();
    	if ( !is_feed() && !is_page() ) {
    	 return $text . $PSR->getVotingStars();
    	 } else {
    	 return $text;
    	 }
    }

Topic Closed

This topic has been closed to new replies.

About this Topic