Polylang & Customizr theme, almost there…
-
Hi Guys,
I’ve been struggling and struggling trying to get my Language switcher flags to be displayed on the right side of my header, beneath the Tagline.
i’ve tried using the
“add-polylang-dropdown-navbar-widget”Even though this is meant for a dropdown box, heck Im just happy if I can get it on the right side of the page :p.
I’ve also tried the
“add-widget-area-header”Currently I do have the language flags available in my header but the outlining is weird!
This is my website
Have tried adjusting the coding, no luck.. I might be missing something? Help!In my Child theme i have the following:
Functions.php// Adds a widget area to house a Polylang dropdown. See also accompanying css. if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Extra Widget After Navbar', 'id' => 'extra-widget', 'description' => 'Extra widget after the navbar', 'before_widget' => '<div class="widget %2$s" id="%1$s">', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>' )); } // Place the widget area after the navbar add_filter ('__after_navbar', 'add_my_widget'); function add_my_widget() { if (function_exists('dynamic_sidebar')) { dynamic_sidebar('Extra Widget After Navbar'); } }
Style.css
#lang_choice_polylang-2 { position: absolute; right: 20px; top: 90px; width: 80px; z-index: 250; } @media (max-width: 979px) { /* Shift dropdown down for responsive navbar*/ #lang_choice_polylang-2 { /* Change this, depending on your site */ top: 130px; } } @media (max-width: 480px) { /* Shift dropdown for smaller screens*/ #llang_choice_polylang-2 { /* Change this, depending on your site */ top: 130px; } } /*
Hope someone can lend me a hand with this!
Thanks in advance,
Rds Jacqueline
- The topic ‘Polylang & Customizr theme, almost there…’ is closed to new replies.