We're merging with GenerateBlocks! Learn more here.

[Support request] Remove slick.woff from WPSP Carousel

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Remove slick.woff from WPSP Carousel

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #19330
    Andres
    Participant

    Hello Tom,

    I hope you had a pleasant weekend.

    We’re using WPSP for a carousel. The carousel has no text. It’s populated with just the featured images from some posts. It is using the lightbox function, and some CSS for arrows.

    When checking which scripts are loading on this page and their loading times, there’s a scrip for fonts, I believe. This is the script’s path: wp-show-posts-pro/modules/carousel/slick/fonts/slick.woff.

    Since no font is required, and since no other page has a WPSP carousel, what can we do to eliminate/dequeue this script to keep it from loading as it’s adding about a quarter of a second of load time?

    Thanks, Tom, and have a good one.

    Andrés

    #19382
    Tom
    Keymaster

    Hi there,

    The dots in the carousel were actually using a font icon as well.

    I’ve changed this so it’s pure CSS, and the font icons will only load if you enable arrows on the list.

    Regardless, the carousel CSS/JS/font icons will only load if a carousel exists on the page.

    Thanks!

    #19392
    Andres
    Participant

    Hello Tom,

    Thanks for the quick answer and for the information.

    What do I need to do on my end to see the changes? Is there an updated version of WPSP that I need to install?

    I went through the various setting on the posts list for the carousel (from Posts through More Settings), and there is no option to enable arrows?

    The way we did the arrows was with the following php you sent:

    add_filter( 'wpsp_carousel_args', function( $args ) {
        $args['arrows'] = true;
        $args['dots'] = false;
    
        return $args;
    } );
    
    wp-show-posts .slick-next:before, 
    .wp-show-posts .slick-prev:before {
        color: black;
    }
    
    .wp-show-posts .slick-arrow {
        z-index: 500;
    }
    
    .wp-show-posts .slick-prev {
        left: 0;
    }
    
    .wp-show-posts .slick-next {
        right: 0;
    }

    Thank you, Tom.

    Cheers!

    Andrés

    #19434
    Tom
    Keymaster

    I just released a new beta today with fixes for this.

    You can subscribe to the beta updates like this: https://docs.wpshowposts.com/article/beta-testing/

    #19754
    Andres
    Participant

    Hello Tom,

    Thank you very much. I got around to updating WPSP Pro today. It worked out great! Thank you very much.

    Regarding the arrows for carousels. where in WPSP’s settings are they? I could not find them. The carousel currently has arrows, which I imagine are from the code referenced in my last message. The arrows style after updating the plugin did change. Before, it was a dark circle with a transparent arrow. Now, they are dark grey arrows.

    The reason I ask is because the arrows are quite small, and I wanted to increase their size.

    In the following code, would I change the value for right: and left: in the last two sections?

    add_filter( 'wpsp_carousel_args', function( $args ) {
        $args['arrows'] = true;
        $args['dots'] = false;
    
        return $args;
    } );
    
    wp-show-posts .slick-next:before, 
    .wp-show-posts .slick-prev:before {
        color: black;
    }
    
    .wp-show-posts .slick-arrow {
        z-index: 500;
    }
    
    .wp-show-posts .slick-prev {
        left: 0;
    }
    
    .wp-show-posts .slick-next {
        right: 0;
    }

    Thank you, Tom, and have a good one!

    Andrés

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.