Simple Random Posts Shortcode WordPress Plugin

A simple but effective WordPress plugin to render random blog posts in pages and/or posts. This is the first public release and features the following shortcode options to customize the rendering process:

  1. header: whether to output header text (default=)
  2. show_featured_image: whether to output featured post image (default=TRUE)
  3. featured_image_height: height of featured image in px (default=100)
  4. preview_text_chars: amount of chars to be displayed for preview text (default=200)
  5. container_css_class: CSS class of outer container (default=articles-preview-container)
  6. container_article_css_class: CSS class of article containe (default=article-preview)
  7. append_css_clear: whether to append a CSS clear container (default=TRUE)
  8. container_left_width: px or % (default=65%)
  9. container_right_width: px or % (default=30%)


In order to use the plugin just insert the shortcode


and use the options provided above to customize the plugin. Feel free to download it from the official WordPress plugin repository.


Below you find a demo using the following shortcode:

simple_random_posts header="<b>Custom header</b>
Custom header
  • Control Zend’s layout rendering and Content-Type specifications
    In case you need to return content types other than the one set by server (Apache, etc.) or Zend itself use the following lines to quickly control Zend's layout rendering and ...
    » Read more
Control Zend’s layout rendering and Content-Type specifications
  • Forward emails to multiple recipients using Microsoft Exchange Server
    Although Microsoft Exchange (5.x+) offers the possibility to forward emails to single recipients it is sometimes necessary to specify a whole list of recipients. Fortunately, in order to ach...
    » Read more
  • Adding advanced formatting to Harshen’s jQuery countdown timer plugin
    Harshen's jQuery countdown timer plugin works great and is simple to use. I...
    » Read more
Adding advanced formatting to Harshen’s jQuery countdown timer plugin
  • WCAG 2.0 – Web Content Accessibility Guidelines
    When designing web sites and portals make sure to also address general accessibility issues governed for instance by the WCAG 2....
    » Read more
WCAG 2.0 – Web Content Accessibility Guidelines
  • Remote Task Notifier
    IntroductionRTN is a web-based client-server application used to "remotely" notify users of  new tasks. The client sends an update request to the server to fetch availab...
    » Read more

You may also like...

6 Responses

  1. Jonathan says:


    How do you use the plugin ?

  2. Jonathan says:


    Thanks and what if i want to display only one post from one category ?

    The random option can still do what it does but i just want to display one post at the time from a specific category

    • Hi Jonathan,
      sorry for the late reply. Out of the box you could check the elements returned by wp_query in the plugin and filter out elements from the same category. But an additional short code option max_entries_per_category would be easier, right? 🙂

  3. Jonathan says:

    no luck bro , where can i add the category id ?

  1. 22/09/2015

    […] just in case you want to customize the way the plugin behaves. This plugin is inspired by the Simple Random Posts Shortcode WordPress Plugin that I released earlier. Based on the great feedback via mail I’ve decided to add […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.