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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #318892

    Iori
    Participant

    Hi, 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/1sce8h2

    No css made through elementor is working in mobile and tablet device.

    #318985

    Iori
    Participant

    Hey, Any update? It’s urgent.

    #319085

    Luke Nielsen
    Keymaster

    Hello,

    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

    #321210

    Iori
    Participant

    Hi, This is the error I’m getting on that code. Please check ::
    https://prnt.sc/1tqm9qw

    #321211

    Iori
    Participant

    This 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

    #321381

    Luke Nielsen
    Keymaster

    Hello,

    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

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