Prior to version 2.8 of WordPress (and since version 1.5), if you wanted an RSS feed on your WP website you would use wp_rss() ... and it works fine. However, support for the very fast and reliable SimplePie library was added in version 2.8 - and it's a far better option. This article will show you how to added a feed to your WordPress website (with only basic options) and cache the result with the WordPress transient API.
What is an RSS feed? RSS (Rich Site Summary) is a format for delivering regularly changing web content. Many news-related sites, blogs, and other online publishers syndicate their content as an RSS Feed to whoever wants it. All WordPress websites usually have an RSS feed available by default.
Using the shortcode of
[rss feed="http://www.beliefmedia.com/feed" size="3"] we'll render the three latest posts from this website. The result is as follows:
Landing Page, Panel, and Form Conditional Redirections Explained – Improve Your Conversions - 14th May 2021
In a number of articles we’ve published to our website recently we’ve discussed how , how to , and how our means that the single on each page is more ...
Include Subscription Forms on Every Page of Your Website - 14th May 2021
In two previous articles we reinforced the concept that every page on your website is a , therefore every page should provide a . Traffic can come from any source ...
Fully Branded White-Label Finance Marketing Booklets and Guides (One-Click Creation) - 12th May 2021
In the former Growth program we ran for nearly 20 years (and almost exclusively since 2015) we’d place a requirement upon brokers to assist with marketing material. We required that ...
The last three results (without description) from our neglected FLIGHT website may be returned with the shortcode of
[rss feed="http://www.flight.org/feed" size="3" heading="h5" excerpt="0"]. The result:
Error. Visit the feed here.
The following shortcode attributes are available:
excerpt="30"(where 30 is the number of words to return). To disable the excerpt, use
moretext is the trailing dots or other characters of your choosing.
date="1"(default). To disable, use
font-weight: normalby default.
dateformat="jS M Y". All available date options are listed in the PHP manual .
h4tags by default.
Copy and paste the WordPress function into your theme's
functions.php file or, if you sensibly have one installed, your custom functions plugin.
- This function is ported from the now retired Internoetics with only minor modifications. It could do with an update!