WordPress.org

Ready to get started?Download WordPress

Forums

How to insert random links from a RSS feed. (5 posts)

  1. FaustinaBlack
    Member
    Posted 7 years ago #

    Ok. I am trying to put a Rss feed on links into a page. I have about 100 links, but only want 20 shown at one time. Is there a way that I can specify in the code of the RSS to randomly show 20 of my links instead of showing the latest 20 or the whole list? It there a simple tag to add to the code so that this would be possible?

  2. davidchait
    Member
    Posted 7 years ago #

    Depends on what precisely you are trying to do.

    CG-FeedRead can read in an RSS feed, parse it, caches the results, formats results into html, caches the html, and displays it. It could be modified to not cache the html, but re-read the results of the feed and then random-pick N entries, and generate the output based on that randomization.

    That's not too hard. The downside is that it has to recalc every pageload (which sounds like what you may want), which means you can't use page-caching (WP-Cache2, for instance) without wrappering the getSomeFeed call 'properly'.

    That make any sense? ;)

    -d

  3. FaustinaBlack
    Member
    Posted 7 years ago #

    that does make sense, I think. I will play around with that. Do you have a link to CG-FeedRead?

  4. davidchait
    Member
    Posted 7 years ago #

    Yep, it's in my CG-PowerPack of plugins.

    If it becomes a more-requested feature, I can build such functionality into a future version.

    -d

  5. FaustinaBlack
    Member
    Posted 7 years ago #

    Thanks so much. I downloaded the pack, could you tell me what files I need to install to just use the CG-FeedRead you suggested? I just don't want to install everything right now, one thing at a time you know :)

Topic Closed

This topic has been closed to new replies.

About this Topic