-
AuthorPosts
-
September 29, 2014 at 9:02 am #114747
simocastiParticipanthi,
i would use the WPML language selector on top bar, from the support of the plugin they say to insert this
<?php do_action('icl_language_selector'); ?>where i want the language selector, but in the top bar this is not working for me, it’s possible that is deactivated the use of php for this area? or what else?
thank you.
simoneSeptember 29, 2014 at 9:14 am #114754
Paul RModeratorHi Simone,
Thanks for writing in.
To do that, you need to set up a child theme first.
Then create file _topbar.php in {x child folder}/framework/views/global
Paste the code below into that file.
<?php // ============================================================================= // VIEWS/GLOBAL/_TOPBAR.PHP // ----------------------------------------------------------------------------- // Includes topbar output. // ============================================================================= ?> <?php if ( x_get_option( 'x_topbar_display', 0 ) == 1 ) : ?> <div class="x-topbar"> <div class="x-topbar-inner x-container-fluid max width"> <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?> <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p> <?php endif; ?> <?php x_social_global(); ?> <div class="wpml-selector"><?php do_action('icl_language_selector'); ?></div> </div> </div> <?php endif; ?>September 29, 2014 at 9:25 am #114763
simocastiParticipantthank you very much for the fast answer.
simone
September 29, 2014 at 9:33 am #114768
CousettMemberGlad we were able to help. 🙂 Have a nice day.
October 27, 2014 at 6:56 am #132890
buhligParticipantGreat help, but any idea how to display the language flags horizontally?
October 27, 2014 at 8:50 am #132962
Kosher KMemberHi There,
Thanks for writing in,
Third party plugin such as WMPL is out of the support we can offer, Please contact wpml regarding this matter,
This article might also help http://wpml.org/forums/topic/only-flags-in-dropdown-language-selector/
Have a great day
September 1, 2015 at 12:55 am #375195
svennuumParticipantHello,
I managed to get the flags to topbar, but there is slight issue. How can I change the color behing the flags, theres is one annoying white area.
Thanks!
SvenSeptember 1, 2015 at 3:13 am #375314
Paul RModeratorHi Sven,
To remove the white background, you can add this under Custom > CSS in the Customizer.
.home #lang_sel_list a.lang_sel_sel, #lang_sel_list a.lang_sel_sel:visited { background-color: transparent; border: 0; } .home #lang_sel_list ul { border-top: 0; }Hope that helps.
September 1, 2015 at 3:49 am #375353
svennuumParticipantThanks! It helped, but same things occurs when adding second language.. http://boost.ee/
September 1, 2015 at 5:01 am #375407
Paul RModeratorHi,
Please add this code as well.
#lang_sel_list ul a.lang_sel_other, #lang_sel li ul a:link, #lang_sel_list ul a.lang_sel_other:visited { background-color: transparent; }Hope that helps.
September 1, 2015 at 6:27 am #375477
svennuumParticipantIt still appears on other pages http://boost.ee/shop/
September 1, 2015 at 7:21 am #375532
ThaiModeratorHi There,
Upon checking your website, I can’t see the language switcher.


Could you please activate it again?
Thanks.
September 1, 2015 at 2:32 pm #375842
svennuumParticipantYeah, sure. Sorry http://boost.ee/shop/
September 1, 2015 at 5:17 pm #375985
Nabeel AModeratorHi again,
Please add the following code to remove the white background:
#lang_sel_list a.lang_sel_sel, #lang_sel_list a.lang_sel_sel:visited { background-color: transparent !important; } #lang_sel_list ul { border-top: none !important; }Let us know how this goes!
September 2, 2015 at 4:54 am #376456
svennuumParticipantWorked very well, thanks a lot! 🙂
Just one more thing regarding to smartphone viewport.
How could I manage to arrange the topbar social icons and language selector to on line, that it wouldnt take so much space?
Screenshot http://boost.ee/wp-content/uploads/2015/09/Photo-02-09-15-12-50-07.png
Thanks and keep up the awesome work!
Sven -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-114747 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
