Shortcode

Feed item display is controlled via the shortcode [wp-rss-aggregator]. This shortcode accepts a number of parameters.

Here’s a list of parameters you can use to display feed items on your posts or pages.

 

IMPORTANT NOTE: 

For the best results, please copy the shortcodes into the WordPress Text Editor, not the Visual Editor.

Edit
Parameter Example
links_before [wp-rss-aggregator links_before='ul class="rss-aggregator"']
links_after [wp-rss-aggregator links_after="ul"]
link_before [wp-rss-aggregator link_before='li class="feed-item"']
link_after [wp-rss-aggregator link_after="li"]
source [wp-rss-aggregator source="55,56"]
exclude [wp-rss-aggregator exclude="26,14"]
limit [wp-rss-aggregator limit="10"]
pagination [wp-rss-aggregator pagination="off"]

You can easily select the source for your feeds and also insert a limit via shortcode parameters as shown below. To get your feed source ID refer to the ID column in your feed source listing page. To make it clearer:

[wp-rss-aggregator source="ID" limit="num"]

If you’ve got the Excerpts & Thumbnails add-on installed, you can also use the following parameters.

Edit
Parameter Possible values Example
thumbnails yes, no | 1,0 | true, false [wp-rss-aggregator thumbnails="no"]
excerpts yes, no | 1,0 | true, false [wp-rss-aggregator excerpts="no"]

With the Keyword Filtering add-on you can filter items from the shortcode, by using the following parameter. Note that the shortcode only accepts one keyword filter, and will not be able to handle multiple filters in the same shortcode.

Edit
Parameter Example
filter [wp-rss-aggregator filter="sports"]

If you’ve got the Categories add-on installed, you can also use the following parameter.

Edit
Parameter Example
category [wp-rss-aggregator category="sports"]
[wp-rss-aggregator category="entertainment, sports"]

Shortcodes are not only limited to usage within posts (the content editor) but also directly in the code of your templates, via the WordPress function do_shortcode().

Here’s an example of how you might call a shortcode directly in your theme’s PHP files:

NOTE: The backslash in the code is not a mistake, it is called an escape character and omitting it will cause the code to break.

 

NOTE:

Once again, for the best results, please copy the shortcodes into the WordPress Text Editor, not the Visual Editor.