Skip Navigation

Waiting for author

Topic Tags: Compatibility

Overview of the issue

If you are using the Udesign theme, you will encounter that WPML’s language switcher does not appear in the mobile menu.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open your theme’s functions.php file.
  • Add the following code:
    1
    2
    3
    4
    5
    6
    7
    add_filter( 'wpml_ls_exclude_in_menu', function( $isExcluded ) {
        if ( isset( $_POST['action'] ) && 'alpha_load_mobile_menu' === $_POST['action'] ) {
            return false;
        }
     
        return $isExcluded;
    } );

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>