Replies: 1 comment
-
The new (since WP 6.2) WP_HTML_Tag_Processor makes this pretty easy! Well first of all, you can add the classes (swiper and swiper-wrapper) to the Query Loop and Post Template respectively in the editor. That's the easy part. The tricky part is getting
Just keep in mind the above will add that class to every query loop. Probably not an issue, but you may want to see if you can target just the specific query loop in question. :_) |
Beta Was this translation helpful? Give feedback.
-
I'd like to use swiper for a wordpress query but I don't have control over the classes of the html layout. So the html doesn't have the classes required by swiper (swiper, swiper-wrapper and swiper-slide).
Do I write a script to add the classes to the html before initialising swiper or is there another way to have swiper use other classes?
Beta Was this translation helpful? Give feedback.
All reactions