GeoDirectory SupportEnfold Compatibility Code (please test) – GeoDirectory Support https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/feed Sun, 05 Apr 2026 21:46:16 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-5913 <![CDATA[Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-5913 Tue, 24 Jun 2014 15:53:27 +0000 Stiofan O'Connor Hello Everyone,

We have started doing our compatibility tests with popular themes, we are almost done with Enfold but would like some user feedback before we package this info a plugin or child theme.

KNOWN BUGS:
#1 location manager switcher not visible (fixed with next core release)
#2 details page slider has larger borders (fixed with next core release)
#3 Home map cat pins very large (fixed with next core release)

INSTRUCTIONS
#1 copy the code below to your child theme(or theme) functions.php (it should be in-between PHP brackets)
#2 leave feedback with any bugs or suggestions.

Thanks,

Stiofan


remove_action( 'geodir_wrapper_open', 'geodir_action_wrapper_open', 10 );
add_action( 'geodir_wrapper_open', 'enfold_action_wrapper_open', 9 );

//add_action( 'geodir_before_main_content', 'enfold_action_wrapper_open', 9 );// full screen map

function enfold_action_wrapper_open(){
echo "<div class='container_wrap container_wrap_first main_color ".avia_layout_class( 'main' ,false)."'>";
echo "<div class='container template-blog '>";

}
// action for adding the wrapperdiv closing tag
remove_action( 'geodir_wrapper_close', 'geodir_action_wrapper_close', 10);
add_action( 'geodir_wrapper_close', 'enfold_action_wrapper_close', 11);
function enfold_action_wrapper_close(){echo '</div></div><!-- content ends here-->';}

// action for adding the sidebar opening tag
remove_action( 'geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10 );
add_action( 'geodir_sidebar_right_open', 'enfold_action_sidebar_right_open', 10, 4 );
function enfold_action_sidebar_right_open($type='',$id='',$class='',$itemtype=''){
$sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : "";
echo "<aside class='sidebar sidebar_right ".$sidebar_smartphone." ".avia_layout_class( 'sidebar', false )." units' ".avia_markup_helper(array('context' => 'sidebar', 'echo' => false)).">";
echo "<div class='inner_sidebar extralight-border'>";
}

// action for adding the primary div closing tag
remove_action( 'geodir_sidebar_right_close', 'geodir_action_sidebar_right_close', 10);
add_action( 'geodir_sidebar_right_close', 'enfold_action_sidebar_right_close', 10,1);
function enfold_action_sidebar_right_close($type=''){echo '</div></aside><!-- sidebar ends here-->';}

// action for adding the content div opening tag
remove_action( 'geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10 );
add_action( 'geodir_wrapper_content_open', 'enfold_action_wrapper_content_open', 9, 3 );
function enfold_action_wrapper_content_open($type='',$id='',$class=''){
echo "<main class='template-page content ".avia_layout_class( 'content',false )." units' ". avia_markup_helper(array('context' => 'content','post_type'=>'page','echo'=>false))." ".$class.">";
}

// action for adding the primary div closing tag
remove_action( 'geodir_wrapper_content_close', 'geodir_action_wrapper_content_close', 10);
add_action( 'geodir_wrapper_content_close', 'enfold_action_wrapper_content_close', 11);
function enfold_action_wrapper_content_close(){echo '</main>';}

add_action( 'geodir_wrapper_open', 'enfold_detail_title', 8,2 );
function enfold_detail_title($page,$class){
	//echo '###'.$page;
	if($page=='details-page'){
		add_action( 'avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8,2 );
		echo avia_title();
	}elseif($page=='listings-page' || $page=='search-page'){
		add_action( 'avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8,2 );
		ob_start() ; // Start buffering;
		geodir_action_listings_title();
		$gd_title = ob_get_clean();
		$title_p = explode('">',$gd_title);
		$title = str_replace('</h1></header>',"",$title_p[2]);
		//print_r($title_p);
		echo avia_title(array('title' => $title));
	}elseif($page=='author-page'){
		add_action( 'avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8,2 );
		ob_start() ; // Start buffering;
		geodir_action_author_page_title();
		$gd_title = ob_get_clean();
		$gd_title = str_replace('<h1>',"",$gd_title);
		$gd_title = str_replace('</h1>',"",$gd_title);
		echo avia_title(array('title' => $gd_title));
	}elseif($page=='add-listing-page'){
		add_action( 'avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8,2 );
		echo avia_title();
	}
}

function enfold_detail_breadcrum($trail, $args ){
	ob_start() ; // Start buffering;
		geodir_breadcrumb();
		$gd_crums = ob_get_clean();
		if($gd_crums){
		$gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>',"",$gd_crums);
		$gd_crums = str_replace('</li></ul></div>',"",$gd_crums);
		$gd_crums = str_replace('</li><li>',"",$gd_crums);
		$gd_crums = explode(" > ", $gd_crums);
		$trail_end = array_pop($gd_crums);
		$gd_crums['trail_end']=$trail_end;
		//print_r($gd_crums);
	//print_r($trail);
	$trail = $gd_crums;
		}
		return $trail;
}

##############################################
########### LISTINGS PAGE ####################
##############################################
remove_action( 'geodir_listings_before_main_content', 'geodir_breadcrumb', 20 );
remove_action( 'geodir_listings_page_title', 'geodir_action_listings_title',10);
##############################################
########### DETAILS PAGE #####################
##############################################
remove_action( 'geodir_detail_before_main_content', 'geodir_breadcrumb', 20 );
remove_action( 'geodir_details_main_content', 'geodir_action_page_title',20);
##############################################
########### SEARCH PAGE ######################
##############################################
remove_action( 'geodir_search_before_main_content', 'geodir_breadcrumb', 20 );
remove_action( 'geodir_search_page_title', 'geodir_action_search_page_title',10);
##############################################
########### AUTHOR PAGE ######################
##############################################
remove_action( 'geodir_author_before_main_content', 'geodir_breadcrumb', 20 );
remove_action( 'geodir_author_page_title', 'geodir_action_author_page_title',10);
]]>
https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-5920 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-5920 Tue, 24 Jun 2014 16:00:36 +0000 directory Thank you, Stiofan.

]]>
https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-5987 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-5987 Tue, 24 Jun 2014 23:55:20 +0000 purpleedge Hi Stiofan, Thanks, can you add it to the post as a txt file attachment please?

]]>
https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6051 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6051 Wed, 25 Jun 2014 03:07:07 +0000 semperteneo anybody have a live demo of this?

]]>
https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6078 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6078 Wed, 25 Jun 2014 05:16:44 +0000 semperteneo https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6081 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6081 Wed, 25 Jun 2014 05:58:13 +0000 semperteneo Popular categories on home page map while on mobile (iOS) has overlapping text.

]]>
https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6484 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6484 Fri, 27 Jun 2014 14:08:26 +0000 Tony Mattioli Curious to know if Avada and Jarada are in the plans, looking forward to the documentation.

]]>
https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6487 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6487 Fri, 27 Jun 2014 14:38:28 +0000 Stiofan O'Connor Avada is in the pipeline, i might get some test code out today

Thanks,

Stiofan

]]>
https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6493 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6493 Fri, 27 Jun 2014 15:00:52 +0000 Stiofan O'Connor As far as i can see avada seems to be ok by default, not perfect but almost.

Stiofan

]]>
https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6650 <![CDATA[Reply To: Enfold Compatibility Code (please test)]]> https://wpgeodirectory.com/support/topic/enfold-compatibility-code-please-test/#post-6650 Sat, 28 Jun 2014 21:36:00 +0000 identity How best to use this with a child theme?

I ask because I initially copied the code into the end of the Enfold child theme functions.php file, which was a straight copy of the parent version, however that started throwing errors just trying to activate. Those errors appeared to be related to the actual Enfold code, so I assumed that it didn’t like getting the same code twice.

I then stripped out all of the Enfold code and pasted in the compatibility code. At that point it seemed to work fine, but when I tried deleting some of the other themes I had, new errors popped up:

Warning: Cannot modify header information – headers already sent by (output started at /home/mysite/public_html/c/wp-content/themes/enfold-child/functions.php:1) in /home/mysite/public_html/c/wp-includes/pluggable.php on line 1121

It did appear to remove the other themes anyway.

Just not sure if this code expects to be called after the Enfold code (at the end of the functions.php file) is parsed, which may be a problem with this child setup…I’m assuming part of that issue is that Enfold needs to fix their code so that a copy of the functions.php file into a child-theme shouldn’t break anything.

Clear as mud?

Cheers

]]>