• Resolved robertobonfatti

    (@robertobonfatti)


    Hi, how can I put WPML language selector next to the left menu icon?
    This is my website: http://cellula.eu/test1
    I can insert language selector inside the left menu, but not into the header.
    I’ve this PHP code
    <?php do_action(‘wpml_add_language_selector’); ?>
    What can I do?
    Thanks a lot!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Rui Guerreiro

    (@takanakui)

    Hi,

    Try to replace the code below that is inside mobmenu.php around line 873

    	if( $titan->getOption('enable_left_menu') ){
    			
    			$output .= '<div  class="mobmenul-container"><a href="#" id="mobmenu-center" class="mobmenu-left-bt">';
    			$left_icon_image = wp_get_attachment_image_src(  $titan->getOption( 'left_menu_icon' )  );
                $left_icon_image = $left_icon_image[0];
    
    			if ( !$titan->getOption( 'left_menu_icon_opt' ) || $left_icon_image == '' ) {
    				$output  .= '<i class="mob-icon-menu"></i><i class="mob-icon-cancel"></i>';
    			} else {
    				$output .= '<img src="' .$left_icon_image . '" alt="Left Menu Icon">';
    			}
    							
    			$output .= '</a></div>';
    
    		}

    by this new block of code

    if( $titan->getOption('enable_left_menu') ){
    			
    			$output .= '<div  class="mobmenul-container"><a href="#" id="mobmenu-center" class="mobmenu-left-bt">';
    			$left_icon_image = wp_get_attachment_image_src(  $titan->getOption( 'left_menu_icon' )  );
                $left_icon_image = $left_icon_image[0];
    
    			if ( !$titan->getOption( 'left_menu_icon_opt' ) || $left_icon_image == '' ) {
    				$output  .= '<i class="mob-icon-menu"></i><i class="mob-icon-cancel"></i>';
    			} else {
    				$output .= '<img src="' .$left_icon_image . '" alt="Left Menu Icon">';
    			}
    							
    			$output .= '</a></div>';
                            echo $output;
                            $output = '';
                            do_action('wpml_add_language_selector'); 
    
    		}

    Let me know if it works.

    -Takanakui

    Thread Starter robertobonfatti

    (@robertobonfatti)

    Thank you so much.
    Now I see the language selector on the top left.
    How can I move it to the right of the menu button, like this: https://goo.gl/OOkt9J
    Thanks a lot for your support!
    Roberto

    Plugin Author Rui Guerreiro

    (@takanakui)

    Great.

    Add this code below to the custom css option in the general options of WP Mobile Menu. That should sort it.

    #lang_sel_list {
        position: fixed;
        left: 90px;
        top: 32px;
    }

    Let me know if it worked.

    -Takanakui

    Thread Starter robertobonfatti

    (@robertobonfatti)

    It works like a charm.
    Thanks a lot for your support!
    Best regards,
    Roberto

    Plugin Author Rui Guerreiro

    (@takanakui)

    No problem. Glad I could help.

    -Takanakui

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘WPML language selector’ is closed to new replies.