Home › Forums › WoodMart support forum › Woodmart slider is ignoring the css for mobile and tablet device
Woodmart slider is ignoring the css for mobile and tablet device
- This topic has 5 replies, 2 voices, and was last updated 3 years, 2 months ago by Luke Nielsen.
-
AuthorPosts
-
September 15, 2021 at 9:07 pm #318892
IoriParticipantHi, I’m creating slides in Worrdmart Slider. The problem is :: It is completely ignoring the padding, margin and other css changes made for mobile and tablet devices. It is inheriting the css for desktop device only.
This is the desktop view :: https://prnt.sc/1sce5bc
This is the mobile view :: https://prnt.sc/1sce8h2No css made through elementor is working in mobile and tablet device.
September 16, 2021 at 9:00 am #318985
IoriParticipantHey, Any update? It’s urgent.
September 16, 2021 at 1:47 pm #319085
Luke NielsenKeymasterHello,
Thank you very much for choosing our theme and for contacting us.
We apologize for keeping you waiting.
Please, try to add this code to the functions.php file in your child theme
function woodmart_elementor_get_content( $id ) { $inline_css = true; $post = new Elementor\Core\Files\CSS\Post( $id ); $meta = $post->get_meta(); ob_start(); if ( $post::CSS_STATUS_FILE === $meta['status'] && apply_filters( 'woodmart_elementor_content_file_css', true ) ) { ?> <link rel="stylesheet" id="elementor-post-<?php echo esc_attr( $id ); ?>-css" href="<?php echo esc_url( $post->get_url() ); ?>" type="text/css" media="all"> <?php $inline_css = false; } echo Plugin::$instance->frontend->get_builder_content_for_display( $id, $inline_css ); wp_deregister_style( 'elementor-post-' . $id ); wp_dequeue_style( 'elementor-post-' . $id ); return ob_get_clean(); }
Kind Regards
September 26, 2021 at 6:32 pm #321210
IoriParticipantHi, This is the error I’m getting on that code. Please check ::
https://prnt.sc/1tqm9qwSeptember 26, 2021 at 6:39 pm #321211
IoriParticipantThis is the error I’m getting while I tried to insert that code to the functions.php file in my child theme :: https://prnt.sc/1tqn23g
September 27, 2021 at 11:09 am #321381
Luke NielsenKeymasterHello,
Please, try to add this code to the functions.php file in your child theme, I fixed this issue.
function woodmart_elementor_get_content( $id ) { $inline_css = true; $post = new Elementor\Core\Files\CSS\Post( $id ); $meta = $post->get_meta(); ob_start(); if ( $post::CSS_STATUS_FILE === $meta['status'] && apply_filters( 'woodmart_elementor_content_file_css', true ) ) { ?> <link rel="stylesheet" id="elementor-post-<?php echo esc_attr( $id ); ?>-css" href="<?php echo esc_url( $post->get_url() ); ?>" type="text/css" media="all"> <?php $inline_css = false; } echo Elementor\Plugin::$instance->frontend->get_builder_content_for_display( $id, $inline_css ); wp_deregister_style( 'elementor-post-' . $id ); wp_dequeue_style( 'elementor-post-' . $id ); return ob_get_clean(); }
Kind Regards
-
AuthorPosts
Tagged: woodmart slider
- You must be logged in to create new topics. Login / Register