WP Manifestindependent plugin directory
manifest / utilities / random-quote-shortcode

Random Quotes Shortcode

Use [random_quote] shortcode to display random quotes from Quotable API.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/ram33z/random-quote-shortcode/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Random Quotes WordPress Plugin

This plugin enables the usage of [random_quote] shortcode, which will display random quote from Random Quotes API.

Installation

Once downloaded just unzip it and move the folder into the /wp-content/plugins folder within your WordPress install.

Usage

Put [random_quote]anywhere in Post content area or in custom_html block of wigets.

Attributes

Following attributes are supported to customize behaviour of [random_quote] shortcode:

  • length : Provide numeric value to limit display of number of characters in Quote. If trimmed, elipses ... are added at the end.
  • class : To replace css class in enclosing html element for Quote. By default blockquote class is added.
  • api: If value false provided then an API call will be omitted and random quote from local static Quotes list will be shown.

Example with attribute

[random_quote api='false' class='strong' length='20']

To display shortcode in header or footer areas add following in your theme's template:

<?php echo do_shortcode("[random_quote]"); ?>

Resources

  • Quotable : Quotable is a free, open source quotations API.