HungryFeed
Hungry FEED is a WordPress plugin that inserts RSS feeds inline onto your blog posts, pages and sidebar widgets. The RSS feed content becomes a part of your page and is not pulled in by the browser via AJAX.
Usage
WordPress Shortcodes allow you to specify parameters which change the behavior of the plugin. The HungryFEED plugin has various optional parameter that allow you to filter the results and customize the feed output.
Basic Parameters
url: (required) The URL to a valid RSS feed is the only required parameter. This URL must contain a valid RSS feed. If this parameter is omitted, a default RSS feed will display instead.
Optional Parameters
max_items: The maximum number of items to display (0 = unlimited)
feed_fields: The feed field are the main title and description that may be provided for an RSS feed. You may specify a comma-separated list of fields to show for the feed. Valid values are title, description. Example: feed_fields=”title,description” if you do not wish to see any of them, you may specify an empty value (feed_fields=””)
item_fields: A comma-separated list of fields to show for each item. Each item in the field has various fields that can be displayed. Valid values are title,description,author, and date. Example: item_fields=”title,author,date” (Note: this parameter is ignored if you specify a template)
link_item_title: Set to 1 or 0 to enable/disable the title link. (Note: this parameter is ignored if you specify a template)
link_target: (added in version 1.3.6) Specify the target for a link, for example to open feed links in a new window. Example: link_target=”_blank” (Note: this parameter is ignored if you specify a template)
date_format: Date format string for the post date. Valid values are anything acceptable by PHP’s date function. Example: date_format=”Y-m-d”
template: (added in version 1.3.0) This can be set to 1,2 or 3 and instead of the default HTML output, HungryFEED will use Custom Template 1,2 or 3 (which you can edit in HungryFEED settings) to display the feed. This allows you to fully customize the way the RSS is displayed.
allowed_tags: (added in version 1.3.3) Use this parameter to strip HTML tags from the RSS Description field. You can specify the HTML tags that are allowed (will not be stripped) by separating them with a comma. For example: allowed_tags=”p,br,a” will strip everything except paragraph marks, line breaks and links.
strip_ellipsis: (added in version 1.3.4) Set this parameter to any value to strip the ellipsis that is added to the end of posts in certain RSS feeds. Example: strip_ellipsis=”1″
truncate_description: (added in version 1.4.2) Set this parameter to a numeric value to truncate the description field to the specified number of characters. Example: truncate_description=”150″
filter: (added in version 1.3.5) Specify filter text to include only feed items that contain that text in either the subject or description. Example: filter=”free” As of version 1.4.1 you can specify multiple filter terms separated with a pipe, for example: filter=”free|phone|computer”
filter_out: (added in version 1.4.5) Specify filter text to exclude feed items that contain that text in either the subject or description. Example: filter=”free” You can specify multiple filter terms separated with a pipe, for example: filter=”free|iphone|computer”
page_size: (added in version 1.3.6) If the RSS feed has a lot of items you can split them up into multiple pages with a previous/next navigation links. Example: page_size=”10″ (This is beta because I don’t know how it will react with various permalink configurations. Please post a comment if you find any problems). Multiple paginated feeds on one page is not supported. It is highly recommended that you have correctly configured caching if you are using pagination.
order: (added in version 1.4.4) Specify an alternate order for the items in the feed. Allowed values are “reverse” “random” and “none” (none added in version 1.5.6). example: order=”reverse”
Debugging Parameters
Debugging parameters may be used to diagnose problems with a feed. You can use these to force HungryFEED to process your url and display the raw output as it is received.
force_feed: If the server does not send the appropriate HTTP headers when outputting the RSS feed, it may not be properly detected as XML. However you can specify force_feed=”1″ to force HungryFEED to parse the feed anyway. If you set this to true, you may see XML errors.
decode_url: HungryFEED attempts to decode the feed URL in order to strip out any formatting that the WordPress visual editor may have added. If your URL is getting mangled, you can set decode_url=”0″ to disable this behavior.
xml_dump: If you have exhausted all troubleshooting options and cannot get a feed to display, you can set xml_dump=”1″ and whatever is being retrieved from the feed server will be output to the browser. WARNING: This may cause your browser to freak out! You will have to look at the page source to make sense of the output. This can be helpful to see what is being returned from the feed URL in its raw form.
What is HungryFEED?
HungryFEED is a plugin that includes an RSS feed within the content of a page or post
Frequently Asked Questions (FAQs)
1. The main title and/or description of the feed is displaying, how can I hide that?
To hide the feed title you can use the feed_items parameter to specify which feed fields you wish to appear like so: feed_items=””. You can use the HungryFEED editor button to help build your shortcode using a GUI.
2. I keep getting the another feed instead of my own, what’s the problem?
That feed is used as the default value if no URL is provided, or WordPress can’t read the URL parameter due to either a syntax error in the shortcode, or a special character in the feed url. Here are some known causes:
- Using curly quotes instead of straight quotes (ie ” vs “) See http://en.wikipedia.org/wiki/Quotation_mark_glyphs
- Certain special characters in the feed url must be url encoded. Here are some known characters and their replacement: “=%22 [=%5B ]=%5D (see http://www.w3schools.com/tags/ref_urlencode.asp)
- Copy/pasting the URL into the shortcode will sometimes create HTML instead of plain text. Use the WordPress editor’s HTML View to view the raw HTML source code of your post and make sure the URL parameter is plain text and not HTML code
3. I’m getting the error that wp-content/cache/ does not exist or is not writeable, what is wrong?
In order to use caching, you must have a folder in wp-content called “cache” which is writable by the web server.
To do this, first create an empty folder in /wp-content/ called “cache” if it does not already exist. Next set permissions of /wp-content/cache/ to 755 or 777 (as necessary on your particular server). Finally, open /wp.config.php and insert the following code anywhere below existing definitions: define(‘ENABLE_CACHE’, TRUE);
If you are not able to do create this folder, you can optionally go to Settings->HungryFEED and set the Cache Duration to 0. However, it is strongly recommended that you do have this directory to enable caching because otherwise WordPress will make a new request to the RSS content provider every time any visitor views your page. This makes your site slower because it has to retrive the RSS content every time. It could also be considered bad etiquette to continually hit your content provider’s feed.
4. How do I put double quotes into a feed url?
To put double-quotes into a feed url, enter %22 instead of the double-quote. This is necessary because the url parameter in the Shortcode is already double-quoted and so you have to use some other character.
5. HungryFEED won’t read my feed, what do I do?
First, enter the feed URL in your browser and see if it displays correctly. If the feed appears to be valid, you may try using some of the debug parameters to investigate. If you still cannot figure out the problem, you can submit a ticket for support (See the Technical Support section above)
6. How can I get a feed to appear in a sidebar widget?
Shortcodes are not enabled in Widgets by default. However as of HungryFEED 1.3.9 there is an option to enable Shortcode processing in Widgets on the HungryFEED settings page. Be aware that this will enable Shortcode for all plugins, not just HungryFEED. WordPress currently does not support selectively enabling Shortcode for a single plugin, so it is an all-or-nothing option.
— October 2013