Showing a simple slideshow by shortcode.
- Add, remove, and reorder images via the admin panel.
- Use the
[simple-slideshow]shortcode to embed slideshows. - Responsive design and lightweight.
- Upload the
simple-slideshowfolder towp-content/plugins/. - Activate the plugin via the WordPress admin panel.
- Navigate to "Simple Slideshow" to configure.
Set up NPM to automatically convert SCSS to CSS, minify JavaScript, generate .opt language files, and create a distributable plugin ZIP file.
- Initial Setup:
Run npm install. - Development Mode: Run
npm run watchfor live reloading. - Build for Production: Run
npm run build. - Create Distributable: Run
npm run publish.
First, install Composer by running the composer install command.
To set up PHPUnit testing, follow these steps:
- Create a testing database.
- Configure the database settings in
/tests/wp-config.php. - Place the distributable plugin inside the
/plugins/my-plugin/wordpress/wp-content/plugins/folder. - Finally, run the
composer testcommand to execute the defined tests.
composer phpcs
composer phpcbf
| Parameter | Type | Default | Description |
|---|---|---|---|
slidesperview |
Integer | 1 | Number of slides to show per view. |
loop |
Boolean | true | Whether to loop the slides (slides will continuously cycle). |
autoplay |
Boolean | false | Whether to automatically play the slides on a timer. |
navigation |
Boolean | false | Whether to display navigation buttons (arrows) for manual control. |
pagination |
Boolean | false | Whether to display pagination dots for navigating slides. |
Example shortcode: [simple-slideshow slidesperview="4" loop="yes" navigation="yes" pagination="yes"]
A working demo is available here.