Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can do it manually. Just use wordpress native function <a href="http://codex.wordpress.org/Function_Reference/fetch_feed" rel="nofollow">fetch_feed</a>.</p> <p>You even have an example in there:</p> <pre><code>&lt;h2&gt;&lt;?php _e('Recent news from Some-Other Blog:'); ?&gt;&lt;/h2&gt; &lt;?php // Get RSS Feed(s) include_once(ABSPATH . WPINC . '/feed.php'); // Get a SimplePie feed object from the specified feed source. $rss = fetch_feed('http://example.com/rss/feed/goes/here'); if (!is_wp_error( $rss ) ) : // Checks that the object is created correctly // Figure out how many total items there are, but limit it to 5. $maxitems = $rss-&gt;get_item_quantity(5); // Build an array of all the items, starting with element 0 (first element). $rss_items = $rss-&gt;get_items(0, $maxitems); endif; ?&gt; &lt;ul&gt; &lt;?php if ($maxitems == 0) echo '&lt;li&gt;No items.&lt;/li&gt;'; else // Loop through each feed item and display each item as a hyperlink. foreach ( $rss_items as $item ) : ?&gt; &lt;li&gt; &lt;a href='&lt;?php echo esc_url( $item-&gt;get_permalink() ); ?&gt;' title='&lt;?php echo 'Posted '.$item-&gt;get_date('j F Y | g:i a'); ?&gt;'&gt; &lt;?php echo esc_html( $item-&gt;get_title() ); ?&gt;&lt;/a&gt; &lt;/li&gt; &lt;?php endforeach; ?&gt; &lt;/ul&gt; </code></pre> <p>You just need to put that in your sidebar.php, wherever you need to show the feed.</p> <p>Edit the line:</p> <pre><code>$rss = fetch_feed('http://example.com/rss/feed/goes/here'); </code></pre> <p>...and point the url to the correct feed. And:</p> <pre><code>$maxitems = $rss-&gt;get_item_quantity(5); </code></pre> <p>...to specify how many items to show (five in the example)</p> <p>Then check the <strong>foreach</strong> inside the UL, there you can style how the feed are shown.</p> <p>By default, fetch_feed function will cache the feeds for 12 hours. If you need to do it every 30 days, you can use the wordpress's <a href="http://codex.wordpress.org/Transients_API" rel="nofollow">Transients API</a> to accomplish that without hassle. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload