Tagged: x
-
AuthorPosts
-
May 9, 2016 at 4:25 am #981929
Hello , it is possible to put polylang on top menu , i put it on topbar but need to put it switcher on top menu
May 9, 2016 at 4:30 am #981933This reply has been marked as private.May 9, 2016 at 5:53 am #982022Hi,
Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
May 9, 2016 at 6:15 am #982055Hi ,
Thank you for fast reply
acctully i want move polylang switcher from topbar to navbar , i put polylang switcher on heard from this topic
https://community.theme.co/forums/topic/polylang-language-switcher-in-the-top-bar/note: i have slider above of my top menu
May 9, 2016 at 8:45 am #982251Hi,
To add it to your navbar, you can add this in your child theme’s functions.php file.
function add_language_switcher( $items, $args ) { echo pll_the_languages(); if(function_exists( 'pll_the_languages' )) { if( $args->theme_location == 'primary' ){ $items .= '<li class="menu-item language-switcher">'.pll_the_languages().'</li>'; } } return $items; } add_filter('wp_nav_menu_items','add_language_switcher', 99999, 2);
Hope that helps.
May 9, 2016 at 9:46 am #982376thanks, i add the code but dont know why it become like picture
May 9, 2016 at 11:28 am #982557Hi there,
Please remove the following line, which is the second line of the above code. That should stop duplicating your languages.
echo pll_the_languages();
Hope that helps.
May 10, 2016 at 9:08 am #984142Thank you
May 10, 2016 at 9:30 am #984167Glad we were able to help 🙂
May 12, 2016 at 5:52 am #987596Hi again , please have look on picture ,
i wrote text on pictureMay 12, 2016 at 9:03 am #987800Hi,
In that case, please remove the code added in your child theme functions.php file.
Then create file _brand.php in wp-content/themes/x-child/framework/views/global and copy the code below into that file.
<?php // ============================================================================= // VIEWS/GLOBAL/_BRAND.PHP // ----------------------------------------------------------------------------- // Outputs the brand. // ============================================================================= $site_name = get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description' ); $logo = x_make_protocol_relative( x_get_option( 'x_logo' ) ); $site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">'; ?> <?php if(function_exists( 'pll_the_languages' )) { ?> <span class="language-switcher"><?php echo pll_the_languages(); ?></span> <?php } ?> <?php echo ( is_front_page() ) ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?> <a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>"> <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?> </a>
Hope that helps.
May 12, 2016 at 9:27 am #987837Thanks for fast reply , something going wrong 🙂
May 12, 2016 at 12:39 pm #988174Hi there,
You can add custom CSS rules to style those area. For example, you can add this under Custom > CSS in the Customizer.
.language-switcher .lang-item { float: left; list-style: outside none none; margin-right: 5px; }
Hope that helps.
May 12, 2016 at 1:59 pm #988316Hi , Language is duplicate and already hoover , Please have look on Duplicate_Language on attachment
May 12, 2016 at 8:21 pm #988862Hi there,
The structure are doubled and no proper wrapper of
<ul></ul>
.Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks!
-
AuthorPosts