Tagged: x
-
AuthorPosts
-
November 17, 2016 at 3:28 pm #1261593
Hello X-Theme-Support,
I have this chanllenge.
My site has to be multilingual – so I ordered WPML. Works fine.
Than I realized I need at least 2 menues for Hone site is onepage navigation via anchors and second level pages have to link to dofferent pages within the menue. So I set um Menue Swapper. Works fine.Now the challenge: WPML supports the Language switcher only for one menue. There it displayes a Dropdown for supportet language behind the last link.
But I need to have the switcher behind every menu.
So they say “just add this code in your template for geting the switcher”: <?php do_action(‘wpml_add_language_selector’); ?>
But where is the location for it in X-theme-child-theme?
Can you help me please?
thank you very much.
November 17, 2016 at 9:47 pm #1262057Hello There,
Thanks for writing in! In the given instruction here: https://wpml.org/wpml-hook/wpml_add_language_selector/, you need to add the code in the location you want the language switcher to display. You can provide us screenshot as to where you want it on the page so we can help you.
Moreover, you might be interested in checking out this pages:
https://wpml.org/forums/topic/how-to-add-the-language-selector-to-my-menu/
https://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/Hope this helps.
December 6, 2016 at 4:38 pm #1283763Hi Rue Nel,
here ist the screen of the Home site (1). There the WPML makes the insert correct (as configured).
the second screenshot (1) is site a level under home with another menue assigned. Here I want to place the Language switcher as in Home site.
December 7, 2016 at 12:42 pm #1284943Hi there,
Thanks for writing back. As it’s in the header. You’ll want to copy the header file for the global header you’re using to the child theme and then add the modified code.
For example, copy the file from x/views/global/_header.php and copy that to the same destination to your child theme and then add the code for the language switcher within that file. Save and then refresh your site. The language switcher should then display correctly.
You can do it after either action, either:
<?php do_action( 'x_before_site_begin' ); ?>
Or
<?php do_action( 'x_after_site_begin' ); ?>
Thanks!
January 5, 2017 at 4:54 pm #1317948We can close this – not because it is solved, but because X Theme supports WPML but WPML not the menue swapper. So I will open an other Thread called: X-Theme with WPML Laguage Switcher in all Menus displayed in one Menu-Location
Thank you.
January 5, 2017 at 6:38 pm #1318061Okay no problem. Feel free to open a new thread.
Thanks.
-
AuthorPosts