Skip to content

BsSwiper change breakpoints #768

Answered by crftwrk
ePiliK asked this question in Q&A
May 12, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

That's a good question. Because breakpoints are set in JavaScript, there is no way to change them in shortcode or override them. So, the best option is to dequeue the init file and enqueue a custom init in child.

/**
 * Dequeue swiper-init.js and enqueue custom
 */
function custom_swiper_init() {
  wp_deregister_script( 'swiper-init-js' );
  wp_dequeue_script( 'swiper-init-js' );

  wp_enqueue_script

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cahoskins
Comment options

@crftwrk
Comment options

Answer selected by ePiliK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants