- Statut
- Résolu par l’auteur
- Extension/thème associé
- Woodmart
- Étiquettes de sujet
- Compatibility
Aperçu de l’anomalie
Les utilisateurs du thème WoodMart peuvent rencontrer un problème où les diapositives traduites s’affichent sur le slider de la langue par défaut. En revanche, lors du changement de langue, les diapositives traduites n’apparaissent pas du tout.
Solution de contournement
Assurez-vous d’avoir une sauvegarde complète de votre site avant de continuer.
Partie I
- Ouvrez le fichier …/wp-content/themes/woodmart/inc/shortcodes/slider.php.
- Recherchez la ligne 103.
- Remplacez :
$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, ), ), );
- Par :
$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, ), ), );
Partie II
- Ouvrez le fichier …/wp-content/themes/woodmart/inc/integrations/wpml/wpml.php.
- Recherchez la ligne 28.
- Remplacez :
$widgets['wd_slider'] = array( 'conditions' => array( 'widgetType' => 'wd_slider' ), 'fields' => array( array( 'field' => 'slider', 'type' => esc_html__( '[Slider] - Slider', 'woodmart' ), 'editor_type' => 'LINE', ), ), );
- Par :
/*$widgets['wd_slider'] = array( 'conditions' => array( 'widgetType' => 'wd_slider' ), 'fields' => array( array( 'field' => 'slider', 'type' => esc_html__( '[Slider] - Slider', 'woodmart' ), 'editor_type' => 'LINE', ), ), );*/