Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #775450

    Hello!
    Could you please help me – i would like to add a widget to left main menu area:
    http://tools.v128bit.ru/scr/1004_ifgzp.png
    How i can do it?
    Thanks!

    #775488

    hm 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.php

    upload 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 6 years, 11 months ago by Guenni007.
    #775491

    Dear 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. ?

    #777395

    is it too complicated?
    There is a position under Menu – above social media links. But register a new “header” widget is here necessary too.

    #777430

    Hi!

    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,
    Basilis

    #777479

    the ava_after_main_menu is there – but it is the position as described after main menu above social media

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.