Archived topic
how to add a WPML language switcher in element hook on one single line ?
7 replies · Started by Thomas on January 26, 2021
hi,
I added a top line of information with an element hook, and I added a WPML language switcher with a shortcake [wpml_language_selector_widget] on the top line. However it displays on two separate lines. How to make it display on the same line ?
actually no, I'd like to display this FR /EN switcher on the the top-right within the grey bar above bar, just after "INFOS PRATIQUES".
Aah ok.
So the simplest solution may be to use a Block Element:
https://docs.generatepress.com/article/block-element-overview/
Combine that with the GenerateBlocks plugin: https://en-gb.wordpress.org/plugins/generateblocks/
Then you can create add a Conatainer Block, to create the background color, within that a Grid Container Block, and then add your shortcode to the left column and text elements in the right.
Thanks for clear answer.
Actually I'm using Beaver Builder as page builder.
Is it possible to replicate what you explained with Beaver Builder, or should I add GenerateBlocks plugin and proceed as you explained ?
Hi,
I don't think Beaver Builder works with the Block Element as this element is intended to be edited with Gutenberg editor.
You can proceed with only using Gutenberg editor plus GenerateBlocks for making column layouts with styling and then add the shortcode and the texts on their intended columns.
Hello, I installed GenerateBlock, made a Block Element with a container, 2 separate columns within, 1st column containing text and 2nd column containing WPML shortcode. However it seems that the shortcode is not recognized...
Any idea why ?
Are you using Gutenberg's Shortcode Block? You can place this block within the 2nd column and use it to run your shortcode.
If you're already doing this, can you test if the shortcode is confirmed to be working properly? Let us know.