Skip Navigation

Open

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',
    		),
    	),
    );*/
    

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>