Random Content Version 1.0 Released

Random Content WordPress plugin banner graphic

Random Content is a WordPress plugin that lets you randomly display any content anywhere on your site. It comes with both a shortcode and a widget. Version 1.0 of the plugin has been completely rebuilt from the ground up using WordPress coding standards.

Since being released in October of 2012 the plugin has been downloaded 4,163 times and received nine 5 star reviews. The plugin works great for anything you want to display randomly, such as:

  • Testimonials
  • Images
  • Quotes

Download on the WordPress plugin repository

What’s New?

New Shortcode Name

When I first released the plugin I didn’t think about the shortcode name being too generic. Every once in a while I receive a support request saying that it breaks the functionality of another plugin’s shortcode. I’ve decided to change the shortcode name and deprecate the old one. The old will still work, but you should use the new one instead.

[random_content]

Place this in your post or page to randomly pull in a post from the Random Content post type. If you want to place it within a theme file, use the do_shortcode function.

New Shortcode Parameter

You’ve always been able to add a group_id parameter to the shortcode to organize by group, but now you can also change the number of a posts that are shown at a time.

[random_content num_posts="3"]

This allows you to randomly load a row or column of different content all at once. Using the CSS of your theme you can style the content to display however you want.

Find the Group ID

Random Content Group ID

Finding the Group ID number is much easier. A new ID column in the Group edit screen now shows the ID number of each group. Use that number to display random content from only that specific group.

[random_content group_id="63"]

Widget Updates

Random Content widget settings

The ability to display more than one random content at a time has also been added to the widget. There is a new field that lets you enter a number for how many posts to show at once.

The group dropdown now has a “none” option. You can choose not to organize content in the widget by a group, even if a group has been created.

Code Overhaul

The codebase for the plugin has been completely rewritten based on the WordPress Plugin Boilerplate. This makes the code more maintainable and easy to read. Updates will also be easier to implement.

Plugin Banner Graphic

This release added a banner graphic to the WordPress repository. This helps the plugin to have a little more personality and stand out from the other plugins in the repository.

Contributing

To contribute, please fork the Random Content plugin on Github. Submit pull requests or create an issue if you would like to help with the development of the plugin.

Download on the WordPress plugin repository

One thought on “Random Content Version 1.0 Released

  1. I applied one group id at Traditional Chinese homepage, it works. However, no post can be displayed when I applied another group id at EN homepage.

    Group:
    TC-winners: ID-22
    EN-winners: ID-23

    TC: [random_content group_id=”22″]
    EN: [random_content group_id=”16″]

    Thank you.

Leave a Reply

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