Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

like:

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

 
discard

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.