• 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)
  • 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.