Tagged: 

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #864170

    Hello.

    I’m trying to add widget area to the header meta div (id=”header_meta”) or before main head (id=”header_main”).
    I need a hook similar to ‘ava_before_bottom_main_menu’.

    Something like ‘ava_before_bottom_main_header’ similar to this:
    add_action( ‘ava_main_header’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }
    or
    add_action( ‘ava_before_bottom_main_menu’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    Thank you.

    #865072

    Hey levlaneadvertising,

    Thank you for using Enfold

    Please use the “avia_meta_header” hook.

    Best regards,
    Ismael

    #865310

    Hey, Ismael.

    The “avia_meta_header” hook doesn’t work.

    Here is what I have (and it’s not working):
    add_action( ‘avia_meta_header’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    When next 2 work:
    add_action( ‘ava_main_header’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    or
    add_action( ‘ava_before_bottom_main_menu’, ‘enfold_customization_header_widget_area’ );
    function enfold_customization_header_widget_area() {
    dynamic_sidebar( ‘header’ );
    }

    #865311

    the hook itself is only one part of the work.
    You have to make a new header on dashboard – appearance – widgets called header.
    the thing with: Enfold Child Custom Widget Area enter header and press “add widget area
    By the way you only can use one of them!
    If you want more than one you have to change function name: enfold_customization_header_widget_area
    and the widget name you like to create header

    next is some css to style it

    • This reply was modified 7 years, 2 months ago by Guenni007.
    #865318

    – Guenni007
    Obviously the hook is only one part of the work. Daa.. Of course I created new header in widgets.
    Why do you think I stated that other hooks work?

    #865343

    well take your enfold folder and do a search to : do_action
    there you got all of the possibilities to hook to.

    you will find in helper-main-menu.php some solutions:

    ava_main_header
    ava_main_header_sidebar
    ava_before_bottom_main_menu
    ava_inside_main_menu
    ava_after_main_menu

    and
    avia_meta_header (don’t know why it is here avia)

    try the last one:

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

    by the way you see that you can insert on your own some do_actions in enfold by:

    ob_start();
    do_action('custom_hook_name'); 
    $output .= ob_get_clean();
    #865376

    Yeah, I already found and tried all of those hook possibilities and all of them work except the one I need “avia_meta_header” lol
    And yes it’s odd that that is the only hook they have with the prefix “avia” and not “ava”…

    #866088

    Hi,

    Did you enable an Header > Extra Element such as the social icons or the secondary menu? If there are no extra elements, please add this filter in the functions.php file.

    add_filter('avf_header_setting_filter', 'avf_header_setting_filter_mod', 9999, 1);
    function avf_header_setting_filter_mod($header) {
    	$header['header_secondary_menu'] = 'extra_header_active';
    	return $header;
    }

    Best regards,
    Ismael

    #866243

    aha – that is the malus if i can not see the site to which it concerns .

    no header_meta there – no success

    great – has he a link to the page in private content ?

    #866285

    Hey, Ismael.
    Yes, I enabled it. I have a phone number in there and I wanted to add a “Font Fesizer” plugin next to it.
    That’s why I wanted to do it the “right way” using functions and hooks. Since I wasn’t able to do it so far I had to drop full html next to the phone number in header meta.

    #866289

    does your Font Resizer support shortcodes to insert it?

    because you can insert in phone info field shortcodes too !

    if no support for it : create your own shortcode for that font-resizer !

    #866942

    Hi,

    Are you using the following font resizer plugin?

    You can use the following function.

    <?php if(function_exists('fontResizer_place')) { fontResizer_place(); } ?>
    

    Combine it with the “avia_meta_header” hook.

    Best regards,
    Ismael

    #867107

    or – if this is the font-resizer you are using do this to your child-theme functions.php:

    function font_resize_shortcode() {
         return fontResizer_place();
    }
    add_shortcode('font-resize', 'font_resize_shortcode');

    and add this to your phone number field: [font-resize]
    the rest will be css ( height and floating behavior)

    #867380

    Thank you, gentlemen!

    @Ismael
    – Yes, correct, it is a plugin.

    @Guenni007
    – Perfect! Worked as a charm!

    #867718

    Hi levlaneadvertising,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

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