Support Forum » User Profile

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: Order not working on the front-end #35879
    Cristian D.Cristian D.
    Participant

    Sure,

    Backend
    https://www.dropbox.com/s/woiasg14y5q9zd0/Captura%20de%20Pantalla%202022-05-04%20a%20la%28s%29%2010.42.07.png?dl=0

    Front-end
    https://www.dropbox.com/s/fs0q3zultjq9osc/Captura%20de%20Pantalla%202022-05-04%20a%20la%28s%29%2010.43.13.png?dl=0

    I think on the front-end is sorting by title and not by the admin order.

    Can you help me please?
    Thank you

    Cristian D.Cristian D.
    Participant

    Hi there!,
    I created an slider for images using a custom block and custom assets for that block and everything is working fine on the front-end but isn't working completely because when I'm editing the page that contain that block the javascript files are not executing because the carousel isn't moving I think I called them correctly and are loading without problems but something isn't working and I can't figure it out what is the problem.
    Do you know if I need to put something else to make this slider works correctly?
    I would like to know if anyone can help me with this please.
    Thank you

    ADMIN SETTINGS

    CUSTOM ASSETS CALLBACK

    function slider_js(){
        if(is_admin()){
            //ADMIN NOT EXECUTING THE JAVASCRIPT INIT BUT ARE LOADING WITHOUT PROBLEMS
            $template_url = get_template_directory_uri();
            wp_enqueue_style('swiper-slider-css', $template_url .   '/assets/css/swiper-bundle.min.css', [], null);
            wp_enqueue_script('swiper-slider-js', $template_url .   '/assets/js/swiper-bundle.min.js', [], null, true);
            wp_enqueue_script('swiper-slider-init', $template_url. '/blocks/slider/js/slider.js', ['swiper-slider-js'],null, true);
        }else{
            //FRONT-END WORKS PRETTY WELL
            $template_url = get_template_directory_uri();
            wp_enqueue_script('swiper-slider-init', $template_url. '/blocks/slider/js/slider.js', [],null, true);
        }
    }

    SWIPER SLIDER INIT

    const slider = new Swiper('.slider-swiper .swiper-container', {
        speed: 700,
        loop:true,
        lazy: {
          loadPrevNext: true,
          loadPrevNextAmount: 2,
        },
        parallax: true,
        autoplay: {
              delay: 4600,
              disableOnInteraction: false,
        },
        pagination: {
          el: '.slider-swiper .swiper-pagination',
          clickable: true,
        },
        navigation: {
          nextEl: '.slider-swiper .swiper-button-next',
          prevEl: '.slider-swiper .swiper-button-prev',
        },
    });    
    Cristian D.Cristian D.
    Participant

    Thank you very much

    Cristian D.Cristian D.
    Participant

    Hi Long, Thank you for your help.
    I was reading the documentation and I tried to use some custom assets on the block render area (using the AIO plugin) I can't get it work correctly.

    Block render settings

    When I did a preview of the code I saw that the functions() is displaying as a string and not outside of that string to call more assets.

    Code preview

    Do you have some ideas that can I use to solve that?

    Thank you

    in reply to: Last update breaks my wordpress #21015
    Cristian D.Cristian D.
    Participant

    same problem here 🙁 I have more than 5 sites broken because of that

    in reply to: MB Builder error when I try to activate the plugin #11528
    Cristian D.Cristian D.
    Participant

    Thank you! I updated my PHP version and now is solved 🙂

    in reply to: Invalid argument foreach() #3739
    Cristian D.Cristian D.
    Participant

    Thank you,
    Now is working fine,
    Best regards

    in reply to: MetaBox - Call to undefined function wp_scripts() #3400
    Cristian D.Cristian D.
    Participant

    PROBLEM SOLVED!,
    Never mind,
    I updated my WordPress to the latest version and now is working fine,
    Thanks

    in reply to: Meta box visible on certain page? #1028
    Cristian D.Cristian D.
    Participant

    Awesome!
    Thank you!

Viewing 9 posts - 1 through 9 (of 9 total)