Tagged: Widget
-
AuthorPosts
-
April 10, 2017 at 1:27 pm #775450
Hello!
Could you please help me – i would like to add a widget to left main menu area:
How i can do it?
Thanks!April 10, 2017 at 2:40 pm #775488hm the place you are looking for has no enfold prepared hook – but we can do it ourself.
if you are working with a child theme please goto your child-theme folder and create a subfolder named: includes
On enfold / includes there is a file : helper-main-menu.phpupload a copy of this to your child-theme includes folder.
We must now insert some code to that copied helper-main-menu.php
On line 199 you see:`/* end container */
$output .= ” </div> “;`after that insert :
/* * Hook that can be used for plugins and theme extensions */ ob_start(); do_action('ava_after_inner_container'); $output .= ob_get_clean();
so you have than :
/* end container */ $output .= " </div> "; /* * Hook that can be used for plugins and theme extensions */ ob_start(); do_action('ava_after_inner_container'); $output .= ob_get_clean(); //output the whole menu echo $output;
so now we have a piece where we can hook the widget to. in your functions.php of your child-theme add:
add_action( 'ava_after_inner_container', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'sidebar-header-widget' ); }
Important: If you have allready used that functions name (enfold_customization_header_widget_area) replace it by another function-name.
Goto your widgets and create a customized widget area called “sidebar-header-widget”
Goto your Quick css and add:
.html_header_sidebar ul.social_bookmarks { border-bottom: 2px solid #efefef; } .html_header_sidebar #header_main .widget { margin: 0 13%; }
PS
Look what happens to this widget area on responsive case! it is than directly under the header.
You will manage that by yourself – i would decide to not show that container and do it to display none ?You can see the test page here: https://webers-testseite.de/kokon/elements/buttons/
- This reply was modified 7 years, 8 months ago by Guenni007.
April 10, 2017 at 2:44 pm #775491Dear Mods : i achieved this allthough i did not link to the new includes subfolder – it seems to work by itself ?
It is directly listet in Dashboard / Appearance / Editor List – is that new – when i take the same folder hierachical structure that it worked without linking. ?April 13, 2017 at 5:27 pm #777395is it too complicated?
There is a position under Menu – above social media links. But register a new “header” widget is here necessary too.April 13, 2017 at 6:23 pm #777430Hi!
We will do forward that to Kriesi. The header widget should be available there by default as it is the same header been used, might be something that has been ” escaped ”
Regards,
BasilisApril 13, 2017 at 7:27 pm #777479the ava_after_main_menu is there – but it is the position as described after main menu above social media
-
AuthorPosts
- You must be logged in to reply to this topic.