RSS setup for a WordPress Blog (2 posts)

  1. footballandhovealbion
    Posted 2 years ago #

    Hello , been asked to do something about a question like this?

    "Would you mind enabling rss feeds, because this page is difficult to read on my phone. Don’t mean to be a complainer, but I figure if it would help me it would probably help others as well. Thanks "

    now the page already has one for twitter and facebook , how do you set one up for the actual blog itself (it sounds crazy to me) or how do you make the blog work like RSS?

    I tried setting it up as a widget - and nothing showed up

    I tried setting up like this

    <?php if(function_exists('fetch_feed')) {
    include_once(ABSPATH . WPINC . '/feed.php'); // the file to rss feed generator
    $feed = fetch_feed('http://www.katearnoldnutrition.co.uk/Common_Sense_Nutrition/feed/'); // specify the rss feed
    $limit = $feed->get_item_quantity(7); // specify number of items
    $items = $feed->get_items(0, $limit); // create an array of items
    if ($limit == 0) echo '<div>The feed is either empty or unavailable.</div>';
    else foreach ($items as $item) : ?>
    // The actual output
    <h1>get_permalink(); ?>" alt="<?php echo $item->get_title(); ?>"><?php echo $item->get_title(); ?></h1>
    <p><?php echo $item->get_date('j F Y @ g:i a'); ?></p>
    <p><?php echo substr($item->get_description(), 0, 200); ?> ...</p>
    <?php endforeach; ?>

    and it throws a hissy fit , what is the best way to go about this?



  2. s_ha_dum
    Posted 2 years ago #

    There are mountains of RSS feeds in WordPress already. If you are using pretty permalinks, append '/feed/' to many of the pages and you will get an RSS feed.

    Maybe I am not understanding something?

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.