Home › Forums › Pro Support › Remove slick.woff from WPSP Carousel
- This topic has 4 replies, 2 voices, and was last updated 3 years, 2 months ago by
Andres.
-
AuthorPosts
-
September 14, 2020 at 3:48 pm #19330
Andres
ParticipantHello 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
September 15, 2020 at 1:43 pm #19382Tom
KeymasterHi 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!
September 15, 2020 at 2:54 pm #19392Andres
ParticipantHello 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
September 16, 2020 at 3:10 pm #19434Tom
KeymasterI 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/
September 22, 2020 at 2:15 pm #19754Andres
ParticipantHello 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
-
AuthorPosts
- You must be logged in to reply to this topic.