WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm desperately trying to call a pretty simple-looking plugin (this one: http://wordpress.org/extend/plugins/wp-random-posts/ ) from a TwentyEleven page template. The goal being to get the thing to display not in the sidebar, but in the middle of a single page. Thing is, I just don't have the skills... can anybody help? I imagine this is an easy one... hopefully.

Thanks, Brin

share|improve this question
How exactly are you trying to call the plugin? – Mark Kaplun Dec 9 '12 at 12:06

Call the method in the class in your template file

WPRandomPosts::GetWPRandomPosts($cat_ID, $col, $UseExcerpt, $beforetitle, $aftertitle, $beforecite, $aftercite);

Give the params in the function for ypur custom output.

  • $col is Number of entries
  • $UseExcerpt is for Display a quote
  • $beforetitle is the Tag before heading out on
  • $aftertitle is the Tag after the header record
  • $beforecite is the Tag to quote on
  • $aftercite is the Tag after a quotation on


WPRandomPosts::GetWPRandomPosts( '', 5, TRUE, '<h3>', '<h3>', '<p>', '</p>' );

share|improve this answer
Wow...thank you very very much - easy to understand and very helpful! Worked a dream! ! ! – Brin Dec 9 '12 at 14:21
Welcome. Please mark the answer als resolved; is usefull for other readers. – bueltge Dec 11 '12 at 9:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.