Plugin Directory

Easy Random Posts

How do I display the results?

Insert the following code into your WordPress theme files:

General results

Without passing any parameters, the plugin will return ten results or fewer depending on how many posts you have.

randomPosts('count=10');

Altering the before and after values

By default the plugin wraps your code in list item (<li>) tags but you can specify how to format the results using the following code:

randomPosts('before=<p>&after=</p>');

The Order

You can now change the order of the results using ASC, DESC or RAND to return the results in ascending, descending or random order of date published.

randomPosts('order=ASC;');

Nofollow

You can set if the link is displayed as a nofollow link for SEO optimization using the new nofollow option.

randomPosts('nofollow=true;');

Echo vs. Return

Finally, if you'd like to copy the results into a variable you can return the results as follows:

randomPosts('show=false');

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus

No data
0,1,0

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(5 ratings)