Skip to content

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

License

Notifications You must be signed in to change notification settings

ram33z/random-quote-shortcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages