Title: Multiple category selection widget   wpml
Last modified: August 20, 2016

---

# Multiple category selection widget wpml

 *  [Katchen](https://wordpress.org/support/users/katchen/)
 * (@katchen)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multiple-category-selection-widget-wpml/)
 * Hello everyone! I can’t get to work the multiple category selection widget with
   wpml… It works fine in the original language, but i’m sure it requires some tweak
   to work with the 2nd…
    has anyone already had this problem? are there any ready
   solutions 🙂 ?

Viewing 1 replies (of 1 total)

 *  [JulienMWS](https://wordpress.org/support/users/julienmws/)
 * (@julienmws)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/multiple-category-selection-widget-wpml/#post-2295775)
 * In mcsw.php, before this code
    `if (!empty($_POST['wpmm']))` put this code :
 *     ```
       $languages = icl_get_languages('skip_missing=0&orderby=code');
           if(!empty($languages)){
               foreach($languages as $l){
                   if ($l['active'] == 1 && $l['language_code'] != 'fr') { // fr is default langage, remplace by YOUR default langage
       				$la_langue = '?lang='.$l['language_code'] ;
       			}
               }
           }
       ```
   
 * then, replace this code :
 *     ```
       if (get_option('permalink_structure')!= '')
                 {
                     wp_redirect(get_bloginfo('url').'/categories/'.$sql.'/search_type/'.$_POST['mmctype'].'/order/'.$_POST['order'].'/');
                         exit();
                 }
                 else
                 {
                     wp_redirect(get_bloginfo('url').'/?cat='.$sql.'&search_type='.$_POST['mmctype'].'&order='.$_POST['order']);
                         exit();
                 }
       ```
   
 * by this one :
 *     ```
       if (get_option('permalink_structure')!= '')
                 {
                     wp_redirect(get_bloginfo('url').'/categories/'.$sql.'/search_type/'.$_POST['mmctype'].'/order/'.$_POST['order'].'/'.$la_langue.'/');
                         exit();
                 }
                 else
                 {
                     wp_redirect(get_bloginfo('url').'/?cat='.$sql.'&search_type='.$_POST['mmctype'].'&order='.$_POST['order'].'&'.$la_langue);
                         exit();
                 }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Multiple category selection widget wpml’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [JulienMWS](https://wordpress.org/support/users/julienmws/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/multiple-category-selection-widget-wpml/#post-2295775)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
