-
AuthorPosts
-
February 10, 2017 at 11:17 pm #745650
Is it possible to add multiple widgets to the header area or will it break the theme? I already have one on the right… but was hoping to add one to the left as well. I’m following this thread http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/
February 14, 2017 at 5:46 pm #747012Hey
You can create two widget areas “header” and “header-left” and change the code to following one
add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'header' ); dynamic_sidebar( 'header-left' ); }
Best regards,
YigitFebruary 14, 2017 at 8:13 pm #747079Ahoy,
When I add a new snippet with that code or add this to snipper with the right header I get this error
Don’t Panic
The code snippet you are trying to save produced a fatal error on line 10:
Cannot redeclare enfold_customization_header_widget_area() (previously declared in /home/sunseek4/public_html/wp-content/plugins/code-snippets/php/admin-menus/class-edit-menu.php(202) : eval()’d code:3)
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.
Please Advise
February 14, 2017 at 9:32 pm #747116Hi!
Please try it as follow
add_action( 'ava_after_main_menu', 'pw_enfold_customization_header_widget_area' ); function pw_enfold_customization_header_widget_area() { dynamic_sidebar( 'header' ); dynamic_sidebar( 'header-left' ); }
Let us know if there is anything else we can do for you.
Best regards,
BasilisFebruary 14, 2017 at 11:51 pm #747205So when I add that it creates another instance of the first header widget which you can see in the screenshot, I dont know why… I named the new widget header-left. This is the shortcode I added, how do I make it left and not display the phone number?
#header-left .widget { right: -40px; padding-top: 0; position: absolute; top: -30px; transform: translate(-50%); z-index: 999; }
Please Advise
February 16, 2017 at 5:24 pm #748055Hi,
Please change the code to following one
#header .widget { padding-top: 0; position: absolute; z-index: 999; } #header #text-6 { right: -40px; top: -30px; transform: translate(-50%); } #header #text-7 { right: -10px; top: -20px; transform: translate(-50%); }
Best regards,
YigitFebruary 16, 2017 at 8:51 pm #748133Hello, I added that code but nothing has changed really. The widget is not in the top left and it is still duplicating the first widget. Please advise
February 17, 2017 at 2:02 pm #748426Hi,
That was because you forgot to remove the code you previously added. I removed it. Please adjust the values to change the position of your widgets
Best regards,
YigitFebruary 17, 2017 at 9:32 pm #748655Hi @yigit,
When I load my page I still see the phone number widget inside the new left widget. I’m pretty confused… What I wanted was one widget in the top right that was the phone number and another widget in the top left that had completely different content in it. The widget is still duplicating the first widget which I do not want. As you can see from my backend widget screenshot that phone numebr shouldn’t be there… screenshot 1 and screenshot 2
Please Advise
February 24, 2017 at 6:14 am #751261Hi!
We added this css code to adjust the position of the phone number widget.
#header #text-6 { left: 80px; top: -30px; transform: translate(-50%); }
Best regards,
IsmaelFebruary 24, 2017 at 7:26 am #751276Hey @ismael,
So I think there is some confusion still…. I want to separate header widgets that have different content inside of them. The left header widget will not have the phone number in it… it will be totally different from the top right widget… Make sense? The code I made in the previous screenshots shows that there is no phone shortcode which I do not want in the left widget. Here is a screenshot mock of what I want… hope this makes sense…
Please Advise
February 27, 2017 at 5:29 am #752137Hi!
There are already 2 widgets in the header. The id of the phone number widget is “#text-6” and other is “#text-7”. If you want to move the left widget, use the following css code.
#header #text-7 { left: 20px; top: -20px; }
Adjust the values as needed.
Best regards,
IsmaelFebruary 27, 2017 at 9:15 pm #752508Hi,
So what I adds that code it just makes the “left widget” disappear. I try and adjust the values but nothing happens. But the double phone number is there…why is this?????? I dont want the phone number twice like i mentioned in my previous posts. See screenshot.
February 28, 2017 at 7:37 am #752751 -
AuthorPosts
- You must be logged in to reply to this topic.