Home › Forums › WoodMart support forum › Rewind Information box carousel
Rewind Information box carousel
- This topic has 11 replies, 3 voices, and was last updated 6 years, 2 months ago by Artem Temos.
-
AuthorPosts
-
October 10, 2018 at 11:20 am #81911
jottenParticipantHey there,
Is it possible to rewind the slider to the first item in the element ‘Information Box Carousel’?
With kind regards.
October 10, 2018 at 11:31 am #81922
Artem TemosKeymasterHi,
Try to add the following PHP code snippet to the child theme functions.php file to do this
function woodmart_shortcode_info_box_carousel( $atts = array(), $content = null ) { $output = $class = $autoplay = ''; $parsed_atts = shortcode_atts( array_merge( woodmart_get_owl_atts(), array( 'slider_spacing' => 30, 'dragEndSpeed' => 600, 'el_class' => '', ) ), $atts ); extract( $parsed_atts ); $class .= ' ' . $el_class; $class .= ' ' . woodmart_owl_items_per_slide( $slides_per_view ); $carousel_id = 'carousel-' . rand(100, 999); $parsed_atts['carousel_id'] = $carousel_id; $parsed_atts['wrap'] = 'yes'; $owl_atts = woodmart_get_owl_attributes( $parsed_atts ); ob_start(); ?> <div id="<?php echo esc_attr( $carousel_id ); ?>" class="woodmart-carousel-container info-box-carousel-wrapper woodmart-carousel-spacing-<?php echo esc_attr( $slider_spacing ); ?>" <?php echo ( $owl_atts ); ?>> <div class="owl-carousel info-box-carousel<?php echo esc_attr( $class ); ?>" > <?php echo do_shortcode( $content ); ?> </div> </div> <?php $output = ob_get_contents(); ob_end_clean(); return $output; } add_shortcode( 'woodmart_info_box_carousel', 'woodmart_shortcode_info_box_carousel' );
Regards
October 10, 2018 at 12:12 pm #81956
jottenParticipantHello,
That works!
Can I ask a different question, but related to the carousel, within this ticket?
Or do I have to open up a new one?Thanks!
October 10, 2018 at 12:40 pm #81971
Elise NoromitMemberHello,
You can go on here. Feel free to ask.
Best Regards
October 11, 2018 at 7:47 am #82131
jottenParticipantHi,
I was struggling to get the carousel to show op nice on mobile (see Attachments).
I would like to have just 1 item but I just can’t seem to get my CSS right.
This doesn’t seem to be a simple setting, although I would assume that this theme would have this as there are alot of Responsive options for different elements.Could you help me with this?
I can provide you with WordPress credentials if needed.Thanks!
Attachments:
You must be logged in to view attached files.October 11, 2018 at 8:31 am #82143
Elise NoromitMemberHello,
Please provide your site admin access and page URL I will check the settings.
Best Regards
October 11, 2018 at 8:58 am #82157
jottenParticipantDone.
October 11, 2018 at 10:39 am #82171
Elise NoromitMemberHello,
Please check the access again I insert and have this result https://gyazo.com/a1afc829c171cf631314d4e8f78269aa
Then I insert again and the same.
Best Regards
October 11, 2018 at 10:50 am #82176
jottenParticipantHey,
For both fields: login
When on the WP login-page use the credentials used when taking the screen capture.Thanks!
October 11, 2018 at 1:12 pm #82210
Artem TemosKeymasterYour admin password is wrong and we can’t access. Try to add the following PHP code snippet to the child theme functions.php file to do this
function woodmart_shortcode_info_box_carousel( $atts = array(), $content = null ) { $output = $class = $autoplay = ''; $parsed_atts = shortcode_atts( array_merge( woodmart_get_owl_atts(), array( 'slider_spacing' => 30, 'dragEndSpeed' => 600, 'el_class' => '', ) ), $atts ); extract( $parsed_atts ); $class .= ' ' . $el_class; $class .= ' ' . woodmart_owl_items_per_slide( $slides_per_view ); $carousel_id = 'carousel-' . rand(100, 999); $parsed_atts['carousel_id'] = $carousel_id; $parsed_atts['custom_sizes'] = array( 'desktop' => 4, 'tablet_landscape' => 3, 'tablet' => 2, 'mobile' => 1, ); $owl_atts = woodmart_get_owl_attributes( $parsed_atts ); ob_start(); ?> <div id="<?php echo esc_attr( $carousel_id ); ?>" class="woodmart-carousel-container info-box-carousel-wrapper woodmart-carousel-spacing-<?php echo esc_attr( $slider_spacing ); ?>" <?php echo ( $owl_atts ); ?>> <div class="owl-carousel info-box-carousel<?php echo esc_attr( $class ); ?>" > <?php echo do_shortcode( $content ); ?> </div> </div> <?php $output = ob_get_contents(); ob_end_clean(); return $output; } add_shortcode( 'woodmart_info_box_carousel', 'woodmart_shortcode_info_box_carousel' );
October 11, 2018 at 1:17 pm #82213
jottenParticipantHello,
Don’t know why you’re having trouble, currently I’m logged in with provided credentials.
Anyhow the snippet works and it is fixed, thanks!With kind regards.
October 11, 2018 at 1:18 pm #82214
Artem TemosKeymasterGreat, you are welcome!
-
AuthorPosts
The topic ‘Rewind Information box carousel’ is closed to new replies.
- You must be logged in to create new topics. Login / Register