Tagged: enfold
-
AuthorPosts
-
November 6, 2015 at 6:35 pm #531620
I had modified the helper-main-menu.php to have if($phone) { echo “<div class=’phone-info {$phone_class}’><span>”.do_shortcode($phone).”</span></div>”; } be moved in the middle of the header area versus above it. I was trying to modify the new helper-main-menu.php and I can’t seem to find where to place that code so it shows up in the right spot. Help?
http://curlyhostzone.com/ is a url that has it modified the way that I want.
Here’s the code and where I had placed it:
<?php
$responsive = avia_get_option(‘responsive_active’) != “disabled” ? “responsive” : “fixed_layout”;
$headerS = avia_header_setting();
$social_args = array(‘outside’=>’ul’, ‘inside’=>’li’, ‘append’ => ”);
$icons = !empty($headerS[‘header_social’]) ? avia_social_media_icons($social_args, false) : “”;if(isset($headerS[‘disabled’])) return;
?>
<header id=’header’ class=’ header_color <?php avia_is_dark_bg(‘header_color’); echo ” “.$headerS[‘header_class’]; ?>’ <?php avia_markup_helper(array(‘context’ => ‘header’,’post_type’=>’forum’));?>>
<?php
if($responsive)
{
echo ‘‘;
echo ‘‘;
}//subheader, only display when the user chooses a social header
if($headerS[‘header_topbar’] == true)
{
?>
<div id=’header_meta’ class=’container_wrap container_wrap_meta <?php echo avia_header_class_string(array(‘header_social’, ‘header_secondary_menu’, ‘header_phone_active’), ‘av_’); ?>’><div class=’container’>
<?php
/*
* display the themes social media icons, defined in the wordpress backend
* the avia_social_media_icons function is located in includes/helper-social-media-php
*/
$nav = “”;//display icons
if(strpos( $headerS[‘header_social’], ‘extra_header_active’) !== false) echo $icons;//display navigation
if(strpos( $headerS[‘header_secondary_menu’], ‘extra_header_active’) !== false )
{
//display the small submenu
$avia_theme_location = ‘avia2’;
$avia_menu_class = $avia_theme_location . ‘-menu’;
$args = array(
‘theme_location’=>$avia_theme_location,
‘menu_id’ =>$avia_menu_class,
‘container_class’ =>$avia_menu_class,
‘fallback_cb’ => ”,
‘container’=>”,
‘echo’ =>false
);$nav = wp_nav_menu($args);
}if(!empty($nav) || apply_filters(‘avf_execute_avia_meta_header’, false))
{
echo “<nav class=’sub_menu’ “.avia_markup_helper(array(‘context’ => ‘nav’, ‘echo’ => false)).”>”;
echo $nav;
do_action(‘avia_meta_header’); // Hook that can be used for plugins and theme extensions (currently: the wpml language selector)
echo ‘</nav>’;
}//phone/info text
$phone = $headerS[‘header_phone_active’] != “” ? $headerS[‘phone’] : “”;
$phone_class = !empty($nav) ? “with_nav” : “”;?>
</div>
</div><?php } ?>
<div id=’header_main’ class=’container_wrap container_wrap_logo’>
<div class=’container’>
<?php
/*
* Hook that can be used for plugins and theme extensions (currently: the woocommerce shopping cart)
*/
do_action(‘ava_main_header’);
if($headerS[‘header_position’] != “header_top”) do_action(‘ava_main_header_sidebar’);
?><div class=’inner-container’>
<?php
/*
* display the theme logo by checking if the default logo was overwritten in the backend.
* the function is located at framework/php/function-set-avia-frontend-functions.php in case you need to edit the output
*/
$addition = false;
if( !empty($headerS[‘header_transparency’]) && !empty($headerS[‘header_replacement_logo’]) )
{
$addition = ““;
}echo avia_logo(AVIA_BASE_URL.’images/layout/logo.png’, $addition, ‘strong’, true);
if(!empty($headerS[‘bottom_menu’])) do_action(‘ava_before_bottom_main_menu’);
if($headerS[‘header_social’] == ‘icon_active_main’ && !empty($headerS[‘bottom_menu’])) echo $icons;if($phone) { echo “<div class=’phone-info {$phone_class}’><span>”.do_shortcode($phone).”</span></div>”; }
/*
* display the main navigation menu
* modify the output in your wordpress admin backend at appearance->menus
*/
$extraOpen = $extraClose = $icon_beside = “”;
if($headerS[‘header_social’] == ‘icon_active_main’ && empty($headerS[‘bottom_menu’])){$icon_beside = ” av_menu_icon_beside”; }
if($headerS[‘bottom_menu’]){ $extraClose = “</div></div><div id=’header_main_alternate’ class=’container_wrap’><div class=’container’>”; }echo $extraClose;
echo “<nav class=’main_menu’ data-selectname='”.__(‘Select a page’,’avia_framework’).”‘ “.avia_markup_helper(array(‘context’ => ‘nav’, ‘echo’ => false)).”>”;
$avia_theme_location = ‘avia’;
$avia_menu_class = $avia_theme_location . ‘-menu’;
$args = array(
‘theme_location’ => $avia_theme_location,
‘menu_id’ => $avia_menu_class,
‘menu_class’ => ‘menu av-main-nav’,
‘container_class’ => $avia_menu_class.’ av-main-nav-wrap’.$icon_beside,
‘fallback_cb’ => ‘avia_fallback_menu’,
‘walker’ => new avia_responsive_mega_menu()
);wp_nav_menu($args);
/*
* Hook that can be used for plugins and theme extensions
*/
do_action(‘ava_inside_main_menu’);if($icon_beside) echo $icons;
echo ‘</nav>’;
/*
* Hook that can be used for plugins and theme extensions
*/
do_action(‘ava_after_main_menu’);
?><!– end inner-container–>
</div><!– end container–>
</div><!– end container_wrap–>
</div><div class=’header_bg’></div>
<!– end header –>
</header>November 9, 2015 at 6:26 am #532365Hi Andrea!
Thank you for using Enfold.
Place it somewhere inside the “header_main” container.
Regards,
IsmaelNovember 19, 2015 at 10:00 pm #539232Yeah, it doesn’t matter where I put it, it always puts it above the <div class=”inner-container”> instead of within it and so the alignment always is off.
November 23, 2015 at 1:12 pm #540748Hey!
Can you use widget area on header instead – http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/?
Cheers!
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.