Blast Slider
Blast Slider
Description
Blast Slider lets you create customizable and responsive post carousels using the Gutenberg block editor, Elementor, or a simple shortcode. Perfect for showcasing recent posts, featured content, or blog categories.
Features:
- Gutenberg block support
- Elementor widget support
- Shortcode
[blast_slider]support with multiple attributes - Responsive layout with Swiper.js
- Show/hide post title, image, date, and excerpt
- Adjust number of posts and visible slides
- Enable/disable loop and autoplay
- Lightweight and blazing fast
Great for blogs, portfolios, news sites, and more.
Shortcode
You can use the [blast_slider] shortcode to display a customizable post carousel anywhere on your site — including inside the Classic Editor, widgets, page builders, or templates.
Basic Usage:
[blast_slider]
Available Attributes:
numberOfPosts— Total number of posts to display. Default:6autoplay— Enable automatic slide change. Acceptstrueorfalse. Default:falseautoplaySpeed— Time in milliseconds between slides (if autoplay is enabled). Default:3000theme— Visual theme of the slider. Acceptslightordark. Default:lightshowTitle— Show the post title. Acceptstrueorfalse. Default:trueshowImage— Show the featured image or a placeholder. Acceptstrueorfalse. Default:trueshowDate— Display the post publication date. Acceptstrueorfalse. Default:trueshowExcerpt— Show an excerpt of the post. Acceptstrueorfalse. Default:trueloop— Enable infinite loop for the slider. Acceptstrueorfalse. Default:falseslidesPerView— Number of visible slides at once. Default:3slidesPerGroup— Number of slides to move per navigation step. Default:3spaceBetween— Space between slides in pixels. Default:20
Example:
[blast_slider numberOfPosts="8" slidesPerView="2" autoplay="true" autoplaySpeed="5000" loop="true" theme="dark"]
In PHP templates:
php
echo do_shortcode('[blast_slider numberOfPosts="4" showTitle="false"]');
Notes:
– If the number of posts is not divisible by slidesPerGroup and loop is enabled, the slider will be filled with empty slides to maintain smooth looping.
– When no posts are found, a fallback message is shown.
– If no featured image is set, a default placeholder image is displayed.
Development
This plugin uses source files located in the /src directory.
– JavaScript: /src/resources/js/blastslider.js
– CSS/SCSS: /src/resources/css/blastslider.css and /src/blocks/post-slider/style.scss
– Gutenberg block source: /src/blocks/post-slider/edit.jsx, save.jsx, index.js
The distributed production files are compiled and minified into the /build directory.
Example:
– /src/resources/js/blastslider.js /build/js/blastslider.min.js
– /src/resources/css/blastslider.css /build/css/blastslider.min.css
Developers can rebuild the /build directory from the /src source files using Node.js and npm:
1. Run npm install
2. Run npm run build to generate minified files.
Third-party libraries
- Swiper v12.0.2 — MIT License — https://github.com/nolimits4web/swiper
Installation
- Upload the plugin files to the
/wp-content/plugins/blast-sliderdirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress.
- Use the Gutenberg block editor, Elementor, or the
[blast_slider]shortcode to insert a carousel into your content.
Faq
You can use either Gutenberg or Elementor — the plugin supports both.
Not yet. The current version supports only standard WordPress posts.
Yes, the carousel is powered by Swiper.js and is fully responsive on all devices.
The placeholder image used by Blast Slider is a static local file included in the plugin. Since it is not part of the WordPress media library, it does not have an attachment ID, and therefore cannot be used with wp_get_attachment_image(). The <img> tag is rendered safely using wp_kses() to comply with WordPress security standards.
Reviews
Changelog
1.0.0
- Initial release
- Gutenberg and Elementor integration
- Post carousel with loop, autoplay, and responsive layout
- Shortcode with full attribute support
- Settings for image, title, excerpt, and more