Title: [Plugin: HungryFEED] Filter doesn&#039;t work
Last modified: August 20, 2016

---

# [Plugin: HungryFEED] Filter doesn't work

 *  [salgeras](https://wordpress.org/support/users/salgeras/)
 * (@salgeras)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/)
 * Hello to all!
 * I apologise if this question has already been asked, I haven’t found it. Feel
   free to point me to that post.
 * I’ve just installed HungryFEED plugin, and it’s working great when I try to rss
   some feed. But, when I add filter option to URL, all I can see is blank page.
 * For example, this works great:
 * [hungryfeed url=”[http://www.b92.net/info/rss/vesti.xml&#8221](http://www.b92.net/info/rss/vesti.xml&#8221);
   max_items=”10″ feed_fields=” ” template=”1″]
 * But, if I try to filter its content:
 * [hungryfeed url=”[http://www.b92.net/info/rss/biz.xml&#8221](http://www.b92.net/info/rss/biz.xml&#8221);
   filter=”kriza|recesija|finansije” max_items=”10″ feed_fields=” ” template=”1″]
 * I receive only empty widget block (since I put rss in widget area, as content
   block).
 * Just to mention that I’ve customized template code, in order to hide description/
   author/date.
 * Custom Template 1:
    <div class=”hungryfeed_item”> <h5>[{{title}}](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/{{permalink}}?output_format=md)
   </h5> </div>
 * Could you please help me with this plugin? Any ideas why filter not working?
 * Thanks in advance!!

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [Jason](https://wordpress.org/support/users/verysimple/)
 * (@verysimple)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415521)
 * I see the problem. when using filter and max_items together hungryFEED seems 
   to be applying max_items before filter. so, it only takes the first 10 items 
   from the feed, then filters those. but in your case the items that match your
   filter appear in items 11-20.
 * it looks like for the moment, you can get it working by removing max_items from
   your shortcode. though you might get too many results, but in your case at the
   moment it only returns 3 results anyway.
 * thanks for letting me know, i’ll have a patch release this weekend.
 *  [Jason](https://wordpress.org/support/users/verysimple/)
 * (@verysimple)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415547)
 * ok update 1.5.5 fixes the problem. now filtering and max_items used together 
   works as it should
 *  Thread Starter [salgeras](https://wordpress.org/support/users/salgeras/)
 * (@salgeras)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415565)
 * [@verysimple](https://wordpress.org/support/users/verysimple/),
 * Thank you very much for your help, really appreciate the speed at which you fixed
   the problem! Yup, everything is ok now.
 * Just one more question: is it possible to combine several words in one filter
   match? For example, how would you look for “blue car”, “red car”? Could I simply
   write filter=”blue car|red car” or perhaps I should join those two words with
   + sign: filter=”blue+car|red+car”?
 * And one more 🙂 Does hungryfeed support target=”_blank” option, in order to open
   link in new tab/window?
 * Once again, thank you for your help!!
 * Best regards
 *  [aletsan](https://wordpress.org/support/users/aletsan/)
 * (@aletsan)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415609)
 * If you are still interested, I found a way to insert target=”_blank” for the 
   links of a feed.
 * Read the topic “Apply custom classes/attributes to parsed elements” to see the
   way I did it, and if it suites you, you can do the same. Or even come up with
   better solution and share it with us.
 * Be warned, this does not work with Internet Explorer, but I am sure we can find
   a way to make MSIE understand what we need …
    I will try and extend my solution
   as fast as possible.
 *  [Jason](https://wordpress.org/support/users/verysimple/)
 * (@verysimple)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415611)
 * cool, nice solution for _blank. since jquery is available on most wordpress themes
   you could probably do it that way instead and it would work in all browsers.
 * @ salgeras if you’re not using a template then you can put link_target=”_blank”
   in your shortcode. that only affects the link to the full article, though, it
   doesn’t affect links within the description, in which case you can use [@aletsan](https://wordpress.org/support/users/aletsan/)’
   s solution.
 *  [aletsan](https://wordpress.org/support/users/aletsan/)
 * (@aletsan)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415613)
 * [@salgeras](https://wordpress.org/support/users/salgeras/),
 * verysimple quickly provided a better solution using jquery that works on all 
   browsers. I tested it in IE, FF, Opera, Chrome and Safari and it works fine. 
   As he said it is kinda hacky, but it does the job.
 * Check the “Apply custom classes/attributes to parsed elements” topic and you 
   can find 2 versions of it for using different versions of jquery.
 *  Thread Starter [salgeras](https://wordpress.org/support/users/salgeras/)
 * (@salgeras)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415624)
 * Sorry for late response, multitasking these days 🙂
 * [@aletsan](https://wordpress.org/support/users/aletsan/),
    Sorry, could you please
   share a link to that topic? Did some googling, but with no success.
 * [@verysimple](https://wordpress.org/support/users/verysimple/),
    I’m using Cruz
   template, so I guess I have to use [@aletsan](https://wordpress.org/support/users/aletsan/)
   solution, since _blank doesn’t work at this moment (open link in same tab). As
   I said in first post, I changed your plugin template to only display rss titles
   and just would like to open thoes links in new tab/window.
 * And, any suggestions regarding that “blue car|red car” question? 🙂
 * Thank you both!!
 *  [aletsan](https://wordpress.org/support/users/aletsan/)
 * (@aletsan)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415627)
 * I can’t understand why the _blank doesn’t work for you. I don’t think it has 
   anything to do with templates, its an attribute for the `<a>` tag and should 
   be working. Of course it depends on what setting the user has for opening new
   windows, but it should work.
    The link for the post about applying _blank attribute
   is:
 * [http://wordpress.org/support/topic/plugin-hungryfeed-apply-custom-classesattributes-to-parsed-elements](http://wordpress.org/support/topic/plugin-hungryfeed-apply-custom-classesattributes-to-parsed-elements)
 * There you can find 2 solutions, depending (I think, but maybe I’m wrong as I’m
   not an experienced programmer) on version of jquery you use. verysimple suggested
   loading version 1.7.1 directly, I have version 1.6.1 already loaded, and I found
   out that I had to use slightly different syntax in the calls. Use whatever works
   for your case.
    The final code that I inserted in HungryFEED’s Custom CSS Code(
   for use with jquery 1.6.1) is
 *     ```
       </style>
       <script type="text/javascript">
        jQuery(document).ready(function($) {
         $('.hungryfeed_item a').attr("target", "_blank");
         $('.hungryfeed_item a').addClass("fancybox iframe {width:930,height:680}");
         $('.hungryfeed_item a').fancybox({
           'centerOnScroll' : 'true',
           'content':$(this).attr('src')
         });
        });
       </script>
       <style>
       ```
   
 * The reverse `<style>` declaration is important as HungryFEED wraps the code of
   custom css in style tags, so we keep them unbroken. I checked it on IE, FF, Opera,
   Chrome, Safari.
 * It applies the _blank attribute to hungyfeed `<a>` tags.
    Also, if you have Easy
   Fancybox installed (and configured), it adds the class to open them in iframe,
   and the parameters for the iframe call. Keep in mind that some sites don’t allow
   their content to be loaded in frames, so do a check first if you use it. In the
   case of fancybox you must insert the call to it, as the class addition must come
   before that, and when we use hungryfeed custom css solution it happens in the
   reverse order.
 * Using this jquery technique you can change the attributes and class of all elements
   that hungryfeed creates. So, the only limit is our imagination.
 * I hope you make it work in the end, if you have any issues post again and I will
   try to help if I can. Be warned that I don’t check my emails too often these 
   days. As you said, I enabled multitasking mode also this period 🙂
 *  Thread Starter [salgeras](https://wordpress.org/support/users/salgeras/)
 * (@salgeras)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415649)
 * Well, 14 days later, finally got some free time to check your post 🙂
 * [@aletsan](https://wordpress.org/support/users/aletsan/),
    thank you so much 
   for your help and this code! Yup, _blank now working like a charm! 🙂 So, to 
   repeat for any HungryFEED users out there, just add aletsan’s code to “Custom
   CSS Code” section. For example, this is mine:
 *     ```
       h3.hungryfeed_feed_title {font-size:10px;}
       p.hungryfeed_feed_description {font-size:10px;}
       div.hungryfeed_items {font-size:10px;}
       div.hungryfeed_item {margin-bottom: 10px;}
       div.hungryfeed_item_title {font-weight: bold; font-size:10px;}
       div.hungryfeed_item_description {}
       div.hungryfeed_item_author {}
       div.hungryfeed_item_date {}
       </style>
       <script type="text/javascript">
        jQuery(document).ready(function($) {
         $('.hungryfeed_item a').attr("target", "_blank");
         $('.hungryfeed_item a').addClass("fancybox iframe {width:930,height:680}");
         $('.hungryfeed_item a').fancybox({
           'centerOnScroll' : 'true',
           'content':$(this).attr('src')
         });
        });
       </script>
       <style>
       ```
   
 * Best regards!
 *  [Jason](https://wordpress.org/support/users/verysimple/)
 * (@verysimple)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415650)
 * awesome. also new in version 1.5.8 there is a field for custom Javascript code
   so you don’t need to add it in the CSS field anymore.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘[Plugin: HungryFEED] Filter doesn't work’ is closed to new replies.

 * 10 replies
 * 3 participants
 * Last reply from: [Jason](https://wordpress.org/support/users/verysimple/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-hungryfeed-filter-doesnt-work/#post-2415650)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
