Tagged: x
-
AuthorPosts
-
January 7, 2017 at 2:43 am #1319956
Pbalazs89ParticipantHi there,
I’m currently building a site at:
http://biokutatas.decorolux.com/
I would like to add an extra ‘li’ item named ‘en’ after the search bar in the top to switch between languages.
Is there a way to do so?
Thanks!
January 7, 2017 at 4:57 am #1320012
ChristopherModeratorHi there,
It depends on your plugin. Which language switcher plugin you use? If you’re using WPML, check this link https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/
Hope it helps.
January 9, 2017 at 5:27 am #1322151
Pbalazs89ParticipantThat I did, end I set it so that the language switcher is the last element in the navbar. So far so good, but if I turn on the search bar, it will place it after the language switcher. Is it possible to have them switch places?
Thanks!
January 9, 2017 at 6:07 am #1322188
Paul RModeratorHi,
You can try adding this in your child theme’s functions.php file
function x_navbar_search_navigation_item( $items, $args ) { if ( x_get_option( 'x_header_search_enable' ) == '1' ) { if ( $args->theme_location == 'primary' ) { $items .= '<li class="menu-item x-menu-item x-menu-item-search">' . '<a href="#" class="x-btn-navbar-search">' . '<span><i class="x-icon-search" data-x-icon="" aria-hidden="true"></i><span class="x-hidden-desktop"> ' . __( 'Search', '__x__' ) . '</span></span>' . '</a>' . '</li>'; } } return $items; } add_filter( 'wp_nav_menu_items', 'x_navbar_search_navigation_item', 0, 2 );Change 0 to adjust priority/order
Hope that helps.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1319956 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
