SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Web Design Ireland cianuro's Avatar
    Join Date
    Jun 2004
    Location
    Dublin Ireland
    Posts
    914
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Wordpress Random Post Feed Plugin?

    Hi guys,
    Does anyone know if such a thing exists?

    I'm looking for a plugin that will generate a feed that contains a random post on my WordPress blog? (Not just random posts in the sidebar).

    Any info would be much appreciated.

  2. #2

  3. #3
    Web Design Ireland cianuro's Avatar
    Join Date
    Jun 2004
    Location
    Dublin Ireland
    Posts
    914
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks but I'm not looking for a random post plugin. I'm looking to create a random post XML FEED. So for example, I can display a random post on another site.

  4. #4
    _ silver trophy ses5909's Avatar
    Join Date
    Jul 2003
    Location
    NoVa
    Posts
    5,467
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I haven't heard of a plugin but it doesn't sound like it would be too difficult to make.
    Sara

  5. #5
    Web Design Ireland cianuro's Avatar
    Join Date
    Jun 2004
    Location
    Dublin Ireland
    Posts
    914
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup. Looks like I'm going to have to make it myself. You see where I'm going with it though.

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,445
    Mentioned
    160 Post(s)
    Tagged
    1 Thread(s)

    random post feed

    Depending on if you wanted a full-blown plugin with ACP control and wanted the "random" in addition to the "regular" feeds it looks like you could hack the
    wp-atom.php, wp-rss.php, and wp-rss2.php files easliy enough. They all have the line
    PHP Code:
    <?php $items_count 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
    You could just change that, or maybe find out where $posts comes from and randomize that.

  7. #7
    Web Design Ireland cianuro's Avatar
    Join Date
    Jun 2004
    Location
    Dublin Ireland
    Posts
    914
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Excellent. That's probably the easiest way. Cheers guys. I got what I needed.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •