Support » Plugins » Random Excerpt outside of WP

  • I would like to have a random thumbnail show up on my main page ( I just inserted an image there, but I would like it to randomize. I installed and activated the Random Excerpt plug in. I got it to work inside my pages, but I cannot get it to work on this index. I put require wp-blog-header and the loop in there, but nothing.
    Here’s what I added:
    in the header:
    /* Don't remove this line. */

    in the body:
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <?php random_excerpt(1, '

  • ', '
  • '); ?>
    <?php endforeach; else: ?>
    <?php endif; ?>

    I am sure I forgot something stupid. What other code would I need to put in my index so that it will pull the random excerpt from the database? Thank you 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • Mark (podz)


    Support Maven

    I love your blog !!!
    Random image .. just use CSS ? and a small script ?

    Thanks podz 🙂
    I will try that…

    Well I got that to work and I’ve got it up for now, but…
    1) I would like the thumbnail to link to the whole post, in case people wanted to see that image bigger
    2) Since my thumbnails are in multiple folders (due to how Pictorialis II is set up), I had to just pic a folder to put the script in, thereby limiting the random choices.
    So is there any other way to go about this?

    I believe I’m looking for a similar plugin.

    Are there any WP 2.0 Compatible “random excerpt” plugins available out there?

    I’d simply like to show a random excerpt from each of my posts on every pageload. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Random Excerpt outside of WP’ is closed to new replies.