Reply To: Align hotelrooms to center on homepage

Premium WordPress Themes Forums Courtyard Align hotelrooms to center on homepage Reply To: Align hotelrooms to center on homepage

#4058
Rabindra Tharu
Participant

Hi, Mariska

Well, you can make it by CSS code. As is it slider we have passed the no of slidesPerView in js file. Please create a child theme and change the custom js for the room slider.

jQuery('.pt-rooms-section').each(function(index, element){
            var container           = jQuery(this).find('.pt-rooms-slider');

            var pt_rooms_slider = new Swiper(container, {
                spaceBetween: 30,
                preventClicks: false,
                slidesPerView: 3, // Change Here and make it as 2
                slidesPerColumn: 1,
                touchEventsTarget: 'swiper-wrapper',
                speed: 800,
                navigation: {
                    nextEl: container.find('.pt-more-arrow .pt-arrow-right'),
                    prevEl: container.find('.pt-more-arrow .pt-arrow-left')
                },
                breakpoints: {
                    992: {
                        slidesPerView: 3 // Change Here and make it as 2
                    },
                    768: {
                        slidesPerView: 2
                    },
                    576: {
                        slidesPerView: 1
                    }
                }
            });
        });

Info:- Please check this tutorial how to edit js file by child theme in WordPress.

Let us know if this helps or need more help please do reply.

Thanks!