Hello, there is a slider type you can select, as fraction, let me know if that doesnt work for you.
hi, could you show me where?
because i need to change it in all WP swiper widgets on all Pages globaly
i visited your page and looks like you have fractions on already
yes on that link sure but check the other one collections and there are still show bullets
i need i think maybe some code script change in all Pages where is added WP swiper block from bulkets to fractions
hi, again. I dont get any respons. Problem is still here? Let me ask you again how can i change it globaly?
sorry but i thought this is already resolved.
you already got one slider working with fractions.
Are you asking how to get the rest of the site’s sliders to match the settings of the slider that you have sshared with the link?
if so, then this is not possible, you need to adjust settings for each block individually. This is by design.
Hi, Plugin Author! Of course, it is possible. Here is the code that changes the global pagination from bullets to fractions to all gutenberg block in all pages.
add_action('wp_enqueue_scripts', function() {
add_action('wp_footer', function() {
?>
<script>
document.addEventListener('DOMContentLoaded', function() {
if (typeof Swiper !== 'undefined') {
const originalSwiper = Swiper;
window.Swiper = function (container, params) {
if (!params) params = {};
if (!params.pagination) params.pagination = {};
params.pagination.type = 'fraction';
params.pagination.el = params.pagination.el || container.querySelector('.swiper-pagination');
return new originalSwiper(container, params);
};
Object.assign(window.Swiper, originalSwiper);
}
});
</script>
<?php
});
});
-
This reply was modified 11 months, 1 week ago by
marcin32167.
This is a very cool solution , thanks for sharing!