WPML
Status
Resolved by author
Related plugin/theme
Woodmart
Topic tags
Compatibility

Overview of the issue

Users of the WoodMart theme may encounter an issue where translated slides display on the default language slider. Instead, when switching languages, the translated slides do not appear at all.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

Part I


  • Open Open the …/wp-content/themes/woodmart/inc/shortcodes/slider.php file.

  • Look for line 103.

  • Replace:
    $args = array(
    	'posts_per_page' => -1,
    	'post_type'      => 'woodmart_slide',
    	'orderby'        => 'menu_order',
    	'order'          => 'ASC',
    	'tax_query'   => array( // phpcs:ignore
    		array(
    			'taxonomy' => 'woodmart_slider',
    			'field'    => 'id',
    			'terms'    => $slider_term->term_id,
    		),
    	),
    );

  • With:
    $args = array(
    	'posts_per_page' => -1,
    	'post_type'      => 'woodmart_slide',
    	'orderby'        => 'menu_order',
    	'order'          => 'ASC',
    	'suppress_filters'          => false,
    	'tax_query'   => array( // phpcs:ignore
    		array(
    			'taxonomy' => 'woodmart_slider',
    			'field'    => 'id',
    			'terms'    => $slider_term->term_id,
    		),
    	),
    );

Part II


  • Open …/wp-content/themes/woodmart/inc/integrations/wpml/wpml.php file.

  • Look for line 28.

  • Replace:
    $widgets['wd_slider'] = array(
    	'conditions' => array( 'widgetType' => 'wd_slider' ),
    	'fields'     => array(
    		array(
    			'field'       => 'slider',
    			'type'        => esc_html__( '[Slider] - Slider', 'woodmart' ),
    			'editor_type' => 'LINE',
    		),
    	),
    );

  • With:
    /*$widgets['wd_slider'] = array(
    	'conditions' => array( 'widgetType' => 'wd_slider' ),
    	'fields'     => array(
    		array(
    			'field'       => 'slider',
    			'type'        => esc_html__( '[Slider] - Slider', 'woodmart' ),
    			'editor_type' => 'LINE',
    		),
    	),
    );*/

All known issues →