Display RSS Feeds With Custom Template Using Shortcodes – LH RSS Shortcode

LH RSS Shortcode is a small WordPress plugin which pulls content from an RSS feed and displays them on your website using shortcodes.

The plugin allows you to define a PHP template to customize the output of the RSS feed.

How to use it:

1. Download, upload, install and activate the LH RSS Shortcode plugin on your WordPress website.

2. Insert the shortcode [lh_rss_shortcode] into your website and specify the URL of the RSS feed.

[lh_rss_shortcode feed="https://wpmissing.com/feed/"]

3. Specify the number of entries to display. Default: 5.

[lh_rss_shortcode feed="https://wpmissing.com/feed/" num="10"]

4. To customize the template, create a new PHP file in your theme folder and define the template as follows:

<?php foreach ( (array) $rss->items as $item ) { ?>
<a href="<?php echo esc_url( $item['link'] ); ?>"><?php echo esc_html($item['title']); ?></a>
<br/><span class="rss_excerpt"><?php echo esc_html($item['summary']); ?></span>
<?php } ?>

5. Then define the path to the template file in the shortcode.

[lh_rss_shortcode feed="https://wpmissing.com/feed/" template="custom.php"]


Display RSS Feeds With Custom Template Using Shortcodes - LH RSS Shortcode

Download WordPress Plugin:

You can download this free WordPress plugin using the download button below. Unless otherwise stated, the WordPress plugin is available under GNU General Public License.

Author: Peter Shaw

Homepage: https://wordpress.org/plugins/lh-rss-shortcode/

Don’t forget to share this WordPress plugin and also check out other awesome plugins on our site.

Rate This Plugin
User Review
0 (0 votes)