Generate a testimonial slider plugin
Testimonials are table-stakes marketing content. The plugins that ship this feature usually work, but accessibility details (arrow keys, pausable auto-advance, focus management) are often an afterthought, and the bundled slider library adds weight you do not need.
A dedicated plugin is small, accessible by default, and lets you filter testimonials by tag or feature the 5 starred ones on specific pages.
Why generate it instead of installing an existing plugin?
Strong Testimonials is the WordPress default and it is capable, but it ships with its own form handling, shortcodes, and options that can feel opaque. Swiper and Splide as general-purpose libraries are fine but you end up wiring the data layer yourself.
A generated plugin registers an acme_testimonial CPT with fields for quote, author, role, avatar, and optional rating. A Gutenberg block renders a slider filtering by tag and count. The slider uses native scroll-snap + IntersectionObserver — no external library.
Accessibility comes built-in: arrow-key navigation, aria-live polite updates, pause on focus/hover, and reduced-motion respect when the user has that OS setting.
Example prompt
This is the kind of description that generates this plugin. You can start from it and tweak whatever you need before hitting generate.
Plugin name: Acme Testimonials
CPT acme_testimonial with fields: quote (textarea), author (string), role (string), avatar (image), rating (1-5 int).
Taxonomy acme_testimonial_tag (flat).
Block acme/testimonial-slider with attributes:
- tag (slug filter)
- count (default 5)
- autoplay (bool, default true, 6s interval)
- show_rating (bool)
Server render: fetches N testimonials, outputs <section role="region" aria-roledescription="carousel"> with <ol> and scroll-snap children.
Frontend JS:
- Prev/Next buttons with aria-labels.
- Arrow-key navigation when focus is in the slider.
- Autoplay pauses on focus, hover, or prefers-reduced-motion.
- aria-live=polite announces the current testimonial.
No external JS library.What the generated plugin typically includes
- Testimonial CPT with admin-friendly fields
- Tag taxonomy for filtered selections
- Gutenberg block with server-side render
- Native CSS scroll-snap slider, no library
- Keyboard + screen-reader accessibility
- Respects prefers-reduced-motion
Fields, slider behavior, and whether testimonials are manually curated or randomized are set in the prompt. Import-from-CSV for initial population is a one-line addition.
Frequently asked questions
Does it support schema.org Review?
Yes. The server render emits JSON-LD Review per testimonial when a rating is present. This can show stars in Google results.
Can I feature specific testimonials?
The "featured" tag is the simplest approach; the block attribute filters by it. You can also weight by field in the prompt.