滑块的自定义 JS 和 CSS 仅适用于 "admin" ,我需要它适用于所有用户(public 用户 + 管理员)

a custom JS and CSS for slider works only for "admin" , i need it to work for all users (public users + admin)

我添加了自定义 JS 和 CSS 文件以添加滑块,但它仅对我(管理员)有效,不适用于 public users.i 通过自定义脚本插件添加它们.这是 JS 和 CSS 代码。

我希望它适用于所有用户

jQuery(document).ready(function( $ ){
      jQuery(".post_slide .elementor-container ").addClass("swiper-container");
  jQuery(".post_slide .elementor-row ").addClass("swiper-wrapper");
    jQuery(".post_slide .elementor-column").addClass("swiper-slide");
  jQuery('.swiper-container').append('<div class="swiper-pagination"></div><div class="swiper-button-prev"></div><div class="swiper-button-next"></div>'); 
  
    var swiper = new Swiper('.swiper-container', {
          spaceBetween: 0,
           slidesPerView: 1,
       speed: 400,
           autoplay:true,
          breakpoints: {
            
            640: {
              slidesPerView: 1,
              spaceBetween: 0,
            },
            768: {
              slidesPerView: 1,
              spaceBetween: 0,
            },
            1024: {
              slidesPerView: 1,
              spaceBetween: 0,
            },
          },
                 
          navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
          },
    
        });
  
  });
.swiper-wrapper {
    display: flex !important;
    flex-wrap: inherit;
  }

我已经更改了自定义文件的位置:

  • 页面上的位置 => 页脚

现在可以使用了!!