This plugin randomizes a collection of testimonials for WordPress. By default, author and comment fields are displayed using the [randomonials]
shortcode. Additional fields can be added by manually editing the randomonials_page.php template found in the public->partials directory before activation. The template should not be edited manually once a testimonial has been added, since it will break the continuity between the data file and template.
This plugin is multisite friendly. On a multisite installation, each blog will have its own set of testimonials associated with it.
This plugin has been tested and runs on WordPress 5.2.2 and 5.2.3. Testing on earlier versions was not carried out, but we welcome collaboration with anyone willing to do those tests.
Shortcode Options
[randomonials type="page" count="0" randomize="true"]
The type
attribute can have one of the following values:
page
- Displays full page of testimonialssingle
- Display a single testimonialgroup
- Displays a row of testimonialsrotator
- Displays a rotator widget cycling testimonials
Note:
As of v1.0.0. only
page
is supported fortype
.
For count, a value of 0 means show all testimonials. Any value greater than 0 will limit the number of testimonials displated to the set quantity.
Testimonials are displayed in randomized order by default. That means on each page load the testimonials will be shuffled. The shuffling can be turned off by setting randomize
to false
.
- NodeJS
- nps (global)
- nps-utils (global)
- Optional: PNPM
- Build and package - nps build
- Build plugin only - nps plugin
- Archive current build - nps archive
- Git clone
https://github.com/dresch86/wp-randomonials
cd
into cloned directory(p)npm install
nps build
- Install zip file in the build directory using the WordPress plugin manager
- Document all functions
- Functionality for displaying single testimonial
- Functionality for rotating testimonials
- Make template editable in the admin panel
- Use a JS table renderer to sync testimonials with JSON instead of refreshing page
- Test on Wordpress 5.2.4