I’m trying to add my GTranslate language switcher (via shortcode) into my menu. What I want is to position the language switcher next to the search icon and cart icon, so that on mobile it stays fixed at the top while scrolling.
How can I make this? See the screenshot for the position i mean.
Hi there,
I’m trying to add my GTranslate language switcher (via shortcode) into my menu. What I want is to position the language switcher next to the search icon and cart icon, so that on mobile it stays fixed at the top while scrolling.
How can I make this? See the screenshot for the position i mean.
Thank you in advance! Tsvete
Attached files: Bildschirmfoto 2025-12-31 um 14.19.32.png
Hi,
You should paste this code into the function.php of the child theme or via the CodeSnippet plugin here: https://wordpress.org/plugins/code-snippets/
add_action( 'penci_header_extra_icons', function() { echo do_shortcode( 'insert the shortcode at this line' ); }, 1 );After adding this code, you will also need to add some additional CSS to ensure it displays correctly.
#navigation .gtranslate_wrapper { float: right; width: auto; vertical-align: middle; margin: 20px 10px 0 10px; } .is-sticky #navigation .gtranslate_wrapper { margin: 10px 10px 0 10px; }Regards,
PenciDesign.