Site logo

Archived topic

Can't not use WPML Shortcodes in Adding HTML Inside the Mobile Header

5 replies · Started by Hieu on July 17, 2018

Viewing posts 1–6 of 6

Hi there, I use code below to add WPML Translator near my mobile logo in functions.php but not working !
Please tell me why and how to fixed this problem ?
It's only show text [wpml_language_selector_widget]

add_action( 'generate_inside_mobile_header','tu_mobile_header_html' );
function tu_mobile_header_html() { ?>

[wpml_language_selector_widget] #Shorcodes not working

<?php }

Hi there try this:

add_action( ‘generate_inside_mobile_header’,’tu_mobile_header_html’ );
function tu_mobile_header_html() { ?>
    <?php echo do_shortcode( '[YOUR SHORTCODE]' ); ?>
<?php }

Thanks but it's not working :(
It's just showing a white dote near Logo, I don't know why -_-

Hi there, add this CSS:

.wpml-ls-statics-shortcode_actions ul {
    display: block;
}

If you want to place it between the logo and nav then this:

.wpml-ls-statics-shortcode_actions {
    -webkit-box-ordinal-group: 4;
    -ms-flex-order: 3;
    order: 3;
    -ms-flex-item-align: center;
    align-self: center;
}

Thanks a lot, it's working :D

Glad to be of help.

This archived topic is closed to new replies.