Tagged: widget next to logo
Hi
I would like to have 2 header widgets. One on each side of the logo & have menu below.
Then in mobile view I need them to stack so they don’t clash with the logo & mobile menu.
What is the code I need to add to enfold child theme functions.php & styles.css
Hey Dave,
Please go to Apperance > Widgets and create two widget areas “header” and “header-two” and then add following code to Functions.php file in Appearance > Editor
add_action( 'ava_main_header', 'enfold_customization_header_widget_area' );
function enfold_customization_header_widget_area() {
dynamic_sidebar( 'header' );
dynamic_sidebar( 'header-two' );
}
Then add following code to Quick CSS in Enfold theme options under General Styling tab
#header .widget:nth-child(1) {
left: 50%;
padding-top: 0;
position: absolute;
top: 0;
transform: translate(-50%);
z-index: 999;
}
#header .widget:nth-child(2) {
left: 0%;
padding-top: 0;
position: absolute;
top: 0;
transform: translate(-50%);
z-index: 999;
}
Best regards,
Yigit