Tagged: enfold
-
AuthorPosts
-
October 13, 2017 at 10:27 pm #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.
October 17, 2017 at 4:13 am #865072Hey levlaneadvertising,
Thank you for using Enfold
Please use the “avia_meta_header” hook.
Best regards,
IsmaelOctober 17, 2017 at 3:33 pm #865310Hey, 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’ );
}October 17, 2017 at 3:36 pm #865311the 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, 1 month ago by Guenni007.
October 17, 2017 at 3:54 pm #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?October 17, 2017 at 4:40 pm #865343well 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' ); }
October 17, 2017 at 4:46 pm #865344by 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();
October 17, 2017 at 5:36 pm #865376Yeah, 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”…October 19, 2017 at 6:39 am #866088Hi,
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,
IsmaelOctober 19, 2017 at 2:54 pm #866243aha – 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 ?
October 19, 2017 at 4:14 pm #866285Hey, 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.October 19, 2017 at 4:21 pm #866289does 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 !
October 21, 2017 at 5:11 am #866942Hi,
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,
IsmaelOctober 21, 2017 at 10:03 pm #867107or – 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)October 23, 2017 at 12:34 am #867380Thank you, gentlemen!
@Ismael – Yes, correct, it is a plugin.
@Guenni007 – Perfect! Worked as a charm!October 23, 2017 at 5:15 pm #867718Hi levlaneadvertising,
Glad you got it working for you! :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.