Avada Compatibility – header.php

UPDATE: As of Avada 3.8+ they have now added compatibility hooks for us and the modifications done to the header.php in the child theme are no longer required, please either delete or rename the header.php file in your child theme if you have previously made the changes below.

The Avada theme lacks any hooks or actions and as such to make GeoDirectory 100% compatible you must make two small changes to the header.php.  

Please follow the steps below:

#1 Move the header.php to your child theme.  You should be running a child theme with Avada, you should copy the header.php from the core Avada theme folder to your child theme folder, if you already have a header.php in your child theme then you should just edit that. (you can edit the core Avada header.php but you will have to do this again if you update Avada)

#2 Edit the file.  You should be able to make these edit from the Appearance>Editor Screen in WordPress, of you can edit the file and upload it.

Edit 1)
Look for:

avada_current_page_title_bar( $c_pageID );

Replace with:

if(apply_filters( 'avada_current_page_title_bar_change', false,$c_pageID)){ do_action('avada_replace_page_title',$c_pageID); }else{
 avada_current_page_title_bar( $c_pageID ); 
 }

Edit 2)

Look for:

?>
<div id="main" class="clearfix <?php echo $main_class; ?>" style="<?php echo $main_css; ?>">

Replace with:

do_action('avada_before_main');
?>
<div id="main" class="clearfix <?php echo $main_class; ?>" style="<?php echo $main_css; ?>">