Support » Plugin: HungryFEED » [Plugin: HungryFEED] Filter by title only

  • Hello,

    The current ‘filter’ option appears to allow keyword filtering on ‘items’. Each item includes both the title and description fields. Is there a way to filter by titles only?

    I’m wanting to provide 5 filtered views of the same RSS feed for a radio blog. They are consistent with naming the radio show titles. However, sometimes they talk about other radio shows within the description of a particular show. So the filtering mechanism is breaking down.


Viewing 2 replies - 1 through 2 (of 2 total)
  • I was able to fix this, but I only needed to filter by titles, and didn’t care about descriptions.

    Edit hungryfeed.php:

    // if any filters were specified, then only show the feed items that contain the filter text
    		if (count($filters))
    			$match = false;
    			$item_will_be_included = false;
    			foreach($filters as $f)
    				// Filter on titles only
    				// if (stripos($description,$f) !== false || stripos($title,$f) !== false)
    				if (stripos($title,$f) !== false)
    					$match = true;
    			if (!$match)
    				// didn't match the filter, exit the foreach loop
    Plugin Author Jason


    looks good, an improvement that might make sense for a future version would be to add that in as a parameter like “filter_title_only”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: HungryFEED] Filter by title only’ is closed to new replies.