Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #993468

    I would like to add a widget area inside the header meta. However when i add the following code

    add_action( 'avia_meta_header', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    	dynamic_sidebar( 'meta-header' );
    }

    It wont let me because I already have a widget inside the header which is

    /* ADD HEADER */
    add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    	dynamic_sidebar( 'header' );
    }
    

    How can I add the extra widget into the header meta area next to the Secondary Menu ?

    Many Thanks
    Regards
    Colin

    • This topic was modified 6 years, 3 months ago by waveseven.
    #993612

    Hey waveseven,

    Please try this instead:

    /* ADD HEADER */
    add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    	dynamic_sidebar( 'header' );
            dynamic_sidebar( 'meta-header' );
    }

    Best regards,
    Rikard

    #993647

    Hi Rikard

    Thanks for the reply. That’s great but that puts the extra widget area into my main navigation bar which is handy to know. But what I would like it to appear in Header Secondary Menu that appears above the logo which is set under Extra Elements

    Header Secondary Menu
    Choose if you want to display a secondary menu and where to display it
    Secondary Menu in top bar at the right

    Many Thanks
    Regards
    Colin

    #994208

    Hi,

    The first hook that you used should have worked.

    add_action( 'avia_meta_header', 'enfold_customization_header_widget_area' );
    function enfold_customization_header_widget_area() {
    	dynamic_sidebar( 'meta-header' );
    }

    What happens when you add that hook? Please post the login details in the private field so that we can test it.

    Best regards,
    Ismael

    #994278

    Hi Ismael

    Login details to a test version of the site are in Private content below

    I’ve put a red box around my item so that you can see it. I want it next to “open an account” at the top.

    Many Thanks
    Regards
    Colin

    #994655

    Hi,

    Thanks for the update.

    I adjusted the filter a bit. The widget is now inside the top bar or meta header. Add a few css codes to adjust the its position.

    /* ADD HEADER */
    add_action( 'ava_after_main_menu', 'ava_after_main_menu_header_widget' );
    function ava_after_main_menu_header_widget() {
    	dynamic_sidebar( 'header' );
    }
    
    add_action( 'avia_meta_header', 'avia_meta_header_woo_tax' );
    function avia_meta_header_woo_tax() {
        dynamic_sidebar( 'meta-header' );
    }
    
    add_filter('avf_execute_avia_meta_header', '__return_true' );
    

    Best regards,
    Ismael

    #994753

    Hi Ismael

    That’s brilliant, thank you,.

    You guys are fantastic as always.

    Regards
    Colin

    #994848

    Hi Colin,

    Great, I’m glad Ismael could help you out :-)

    Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

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