• Mark

    (@encryptdesigns)


    Hey all. What I am trying to do is this:

    I have a page setup with these different Categories:

    National
    Sports
    Religion
    Entertainment
    Money

    When someone clicks on “National” I want several RSS feeds to pull into that page displaying national news. So on and so forth with the other pages.

    I am not looking at stealing RSS feeds. But I would like to display each “story” as its own post. There are several plugins out there but I’m not sure which one I should use. I started using FeedWordPress but I don’t think it can do what I’m looking at doing.

    Does anyone have any suggestions?

    Thank you!

    -Mark

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    I would write your pages using the RSS reading functions and make the output look like your normal posts output.

    See here: https://codex.www.ads-software.com/Function_Reference/fetch_rss

    Thread Starter Mark

    (@encryptdesigns)

    But how do I get different RSS feeds for different pages. I understand about the Fetch RSS but I don’t get how to get a different RSS feed for different pages.

    Thread Starter Mark

    (@encryptdesigns)

    Would I just simply create other “template” pages and have a different set of PHP code like this?

    <?php
    require_once(ABSPATH . WPINC . ‘/rss-functions.php’);
    $rss = fetch_rss(‘FEEDURL’);
    echo ‘

    ‘;
    ?>

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    You could do it in one of several ways. You could code a different template for each page. That would be simplest.

    For a large number of pages, you could be clever about it and code the template to pull out the page’s content, parse it into a list of URLs, and get those URLs.

    Thread Starter Mark

    (@encryptdesigns)

    Is there an easy way to show a set amount of data for each post instead of just the links?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    You can show anything you like, as long as it’s in the feed.

    Try adding var_dump($item) to your foreach loop. This will dump all the data it pulled out of the feed item to the output, letting you see what is available. In the same way that you echo $item[‘title’], you can echo other stuff as well, and that will show you what’s in there.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Multiple RSS Feeds for different WP Pages’ is closed to new replies.