Random Content

外掛說明

This plugin allows you to display random content anywhere on your site using a shortcode or widget. You can group your random content together, allowing you to display different content in multiple locations throughout your site.

The content is added via a custom post type, so you have full access to the tinyMCE editor. This allows you to easily add images, text, and links to your random content.

Using a widget

  1. Navigate to Appearance->Widgets and add the Random Content widget to a sidebar.
  2. Select a group from the dropdown. If you don’t create a group, the widget will use all entries.

Using a shortcode

Place the shortcode [random_content] anywhere on a post or page.

To choose entries from a specific group, add the group_id parameter. For example, [random_content group_id="64"].

To specify the number of posts to show, add the num_posts parameter. For example, [random_content group_id="13" num_posts="3"].

螢幕擷圖

  • Adding the widget to a sidebar.

安裝方式

  1. Upload random-content.php to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Create an entry in the Random Content post type.
  4. Categorize your content using Groups.

Only content within the content editor will be displayed.

常見問題集

Can I group certain entries together?

Yes. Create a group, and assign specific entries to the group. It works just like categories.

How do I find the group id?

Click on Random Content > Group in the WordPress admin. Look for the number in the ID column.

How do I display more than one post?

In the shortcode, use the num_posts parameter. In the widget, enter a number in the “Number of Posts to Show at Once” input.

使用者評論

2021 年 10 月 22 日
It does exactly what it says. I haven't encountered any bugs at the moment in WordPress 5.8.1. But please update this great plugin. We are concerned about version incompatible plugins. Thanks.
2021 年 3 月 31 日
I wish I could give this plugin more than 5 stars! It creates the right conditions to execute my ideas beautifully without onerous tutorials and steps. Random Content is still THE ONLY plugin that delivers exactly what I need in order to bring my vision for an "Idea-Making Gizmo" to life! Additionally, I found myself in need of support on a compatibility issue and Jeremy Green himself not only updated the amazing plugin but guided me patiently until it was up and running again. I unreservedly recommend this plugin and any product offered by Jeremy Green and Endo Creative.
2019 年 12 月 5 日
I was looking for a solution for randomly displaying specific content in two sections of the same page. The Random Content plugin does exactly what I need. And it allows me to quickly edit the random content I've already created. Thanks for creating this plugin!
閱讀全部 29 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Random Content〉的開發相關工作。

參與者

將 Random Content 外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.4.0

  • Add support for block editor
  • Update widget settings

1.3.2

  • Update tested to version

1.3.1

  • Fix shortcode output so that multiple posts will display

1.3

  • Add rc_content filter for extending the plugin output in both the shortcode and the widget
  • Add content filter to widget output to allow for oembed support

1.2

  • Add localization files for translation support

1.1

  • Add num_posts parameter to old version of shortcode for backwards compatibility

1.0

  • Update shortcode to [random_content] to help prevent conflicts with other plugins
  • Added a num_posts paramenter to the shortcode so that more than one post can show at a time
  • Added the ability to not choose a group in a widget, even if a group exists
  • Added the ability to control the number of posts that show in the widget
  • Rebuilt the plugin using OOP principles based on the WordPress plugin boilerplate
  • Added plugin banner graphic
  • Updated screenshot image

0.4

  • Update input text syntax in widget

0.3

  • Add shortcode functionality.
  • Reset post data after widget query.

0.1

  • First released into the wild.