Created by shortcodes: [taxonomy_chain_menu post_type=’product’ exclude=’89,105′ taxonomy=’product_cat’ target=’_blank’ label_taxonomy=’call_filter_chain1′ label_post=’call_filter_chain1-post’ button_title=’Take it!’ do_filter2=’woof’ watch_view=’post’ label_before=’Select your wear‘ select_wrapper=’selectron23′ chain_id=’chain1′ select_width=’300px’ selectron23_max_open_height=’300′]
See also the code below products.
Notes:
- target – this attribute is from premium version of the plugin
- label_taxonomy=’Type|Model’ – such syntax is from premium version of the plugin
- label_before – this attribute is from premium version of the plugin
- select_wrapper – this attribute is from premium version of the plugin
The same shortcode but with premium attribute ‘select_wrapper‘:
To make compatible with WPML in file functions.php added next code:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | //[taxonomy_chain_menu label_taxonomy='call_filter_chain1' label_post='call_filter_chain1-post'] add_filter('chain1', function($args) {     $res = 'Wear Type|Gender|Model';     if (defined('ICL_LANGUAGE_CODE')) {         switch (ICL_LANGUAGE_CODE) {             case 'es':                 $res = 'Tipo de ropa | Gender | Modello';                 break;             case 'uk':                 $res = 'Тип одягу | Стать | Модель';                 break;         }     }     return $res; }, 10, 1); add_filter('chain1-post', function($args) {     $res = 'Your new wear';     if (defined('ICL_LANGUAGE_CODE')) {         switch (ICL_LANGUAGE_CODE) {             case 'es':                 $res = 'Tu nueva ropa';                 break;             case 'uk':                 $res = 'Візьміть свій новий одяг';                 break;         }     }     return $res; }, 10, 1); | 
The same way is possible to adapt Taxonomy Chain Menu with another translation plugins.
For Selectron23 drop-down wrapper in file functions.php applied next code:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | add_filter('taxonomy-chain-menu-option-data', function($id, $taxonomy, $parent_id, $chain_id) {     $data = [];     $get_thumbnail = function ($thumbnail_id, $size = 'thumbnail') {         $img = wp_get_attachment_image_src($thumbnail_id, $size);         if (!isset($img[0])) {             $img = wp_get_attachment_url($thumbnail_id);         } else {             $img = $img[0];         }         return $img;     };     //+++     if ($chain_id === 'chain1') {         if ($taxonomy === 'product_cat') {             $term_id = $id;             if ($term_id > 0) {                 $data['text'] = strip_tags(tag_description($term_id));                 $thumbnail_id = get_term_meta($term_id, 'thumbnail_id', true);                 $data['img'] = $get_thumbnail($thumbnail_id);             } else {                 //labels                 $deep = 0;                 if ($parent_id > 0) {                     $deep = count(get_ancestors($parent_id, $taxonomy)) + 1;                 }                 switch ($deep) {                     case 0:                         $data['text'] = 'Best clothing types';                         $data['img'] = $get_thumbnail(1378);                         break;                     case 1:                         $data['text'] = 'Select your style';                         $data['img'] = $get_thumbnail(1382);                         break;                     case 2:                         $data['text'] = 'Best categories for you';                         $data['img'] = $get_thumbnail(983);                         break;                 }             }         }         if ($taxonomy === 'is_post') {             $post_id = $id;             $data['text'] = 'Any short text about post here';             $data['img'] = $get_thumbnail(get_post_thumbnail_id($post_id)); //featured image         }     }     return $data; }, 10, 4); | 
Documentation: https://pluginus.net/shop/wordpress-plugins/wordpress-filter-plugins/taxonomy-chain-menu/
 
				