I want to put the "swiper slider" in my front page. I can set this plugin work with html, js, css. But, I wonder how to change images of this slider in admin. when I use jquery plugin, I want to change image of slide in admin area. Can you give me some tips to change images in admin that is tagged in html.

1 Answer 1


There are multiple ways to make the slider dynamic.

If you use the Gutenberg editor, you can add new style to the Gallery like this:

register_block_style( 'core/gallery', [
  'name'  => 'swiper',
  'label' => __( 'Swiper Slider' ),
] );

Then create gallery and choose the Swiper style. It will add an extra class is-style-swiper to the gallery. Target that with CSS and JS.

If you use ACF (Advanced Custom Fields), then it's even easier to change the HTML markup to fit whatever Swiper needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.