GeoDirectory SupportHow to change default tab (from profile to review)? – GeoDirectory Support https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/feed Sat, 13 Dec 2025 19:14:32 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-21693 <![CDATA[How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-21693 Mon, 17 Nov 2014 07:59:32 +0000 magnaromagna Hi,
I’m using GDF modern, and I’d like to set up as default tab not the profile of the listing but the review section. How to do? Is there an option or need to change a php file? (or better add an istruction into functions.php of the theme)

Thanks!

]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-21694 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-21694 Mon, 17 Nov 2014 08:05:11 +0000 Guust A search came up with this: https://wpgeodirectory.com/support/topic/exclude-selected-tabs-from-detail-page-if-empty/#post-7305

]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-22451 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-22451 Mon, 24 Nov 2014 13:47:15 +0000 magnaromagna Thanks. I followed instructions, and inserted the code mentionned by adding at first place the review tab instead the profile tab. But opening a detail page is still show the Profile as default (even in 2nd tabs instead of 1st). My question is how can I force open the review tab instead the profile tab. Maybe through CSS? Thanks again


// begin change order tabs //

add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ;

function geodir_detail_page_tab_list_extend($tab_array)
{
 // here u can modify this array, u can create a completely new one too.
     if(isset($tab_array['reviews'])){
         $new_tab_array['reviews'] = $tab_array['reviews'];// set in new array
		 unset($tab_array['reviews']);//unset in old one
	 }
     if(isset($tab_array['post_profile'])){
         $new_tab_array['post_profile'] = $tab_array['post_profile']; // set in new array
		 unset($tab_array['post_profile']);//unset in old one
	 }

     if(isset($tab_array['post_map'])){
         $new_tab_array['post_map'] = $tab_array['post_map'];// set in new array
		 unset($tab_array['post_map']);//unset in old one
	 }

    if(isset($tab_array['special_offers'])){
         $new_tab_array['special_offers'] = $tab_array['special_offers'];// set in new array
		 unset($tab_array['special_offers']);//unset in old one
	}

     if(isset($tab_array['post_info'])){
         $new_tab_array['post_info'] = $tab_array['post_info'];// set in new array
		 unset($tab_array['post_info']);//unset in old one
	 }

    if(isset($tab_array['post_images'])){
         $new_tab_array['post_images'] = $tab_array['post_images'];// set in new array
		 unset($tab_array['post_images']);//unset in old one
	}

    if(isset($tab_array['post_video'])){
         $new_tab_array['post_video'] = $tab_array['post_video'];// set in new array
		 unset($tab_array['post_video']);//unset in old one
	}

     if(isset($tab_array['special_offers'])){
         $new_tab_array['special_offers'] = $tab_array['special_offers'];// set in new array
		 unset($tab_array['special_offers']);//unset in old one
	 }

     

	// now we set any remaining tabs that have not been assigned an order
	foreach($tab_array as $key=>$tab){
	$new_tab_array[$key]=$tab;
	}

    return $new_tab_array ;
}

// end change order tabs //
]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-22937 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-22937 Fri, 28 Nov 2014 14:36:45 +0000 magnaromagna Up.
Need to change some css?
Thanks!

]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-22939 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-22939 Fri, 28 Nov 2014 14:41:28 +0000 Guust Might be simpler to append #reviews to each url going to a detail page.
Not sure whether that is possible, but Paolo should be able to tell you.

]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-23956 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-23956 Tue, 09 Dec 2014 19:26:35 +0000 magnaromagna Thanks for tip. I’d prefer that the default url shows the reviews without append the #reviews.

I see that in css is:


<dd  >
<a data-tab="#reviews" data-status="enable">Reviews</a>
</dd>
<dd class="geodir-tab-active" >
<a data-tab="#post_profile" data-status="enable">Profile</a>
</dd>

So to move

class="geodir-tab-active"

I have to modify a php file? Or need to add a php line into theme functions.php?

Thanks

]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-24021 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-24021 Wed, 10 Dec 2014 16:44:59 +0000 Stiofan O'Connor OK this is easier than you think…


 if(isset($tab_array['reviews'])){
         $new_tab_array['reviews'] = $tab_array['reviews'];// set in new array
		 $new_tab_array['reviews']['is_active_tab']='1';
		 unset($tab_array['reviews']);//unset in old one
	 }
     if(isset($tab_array['post_profile'])){
         $new_tab_array['post_profile'] = $tab_array['post_profile']; // set in new array
		 $new_tab_array['post_profile']['is_active_tab']='';
		 unset($tab_array['post_profile']);//unset in old one
	 }

the

...['is_active_tab']='1';

sets any tab to be the default but you can have only one so u must remove the profile tab with the same code

...['is_active_tab']='';

Thanks,

Stiofan

]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-31755 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-31755 Mon, 23 Feb 2015 12:54:18 +0000 magnaromagna Hi, I’m still having some issues on this little hack: the order of the tabs has changed, but it still shows the description as active tab instead of reviews tab. I used the code following above tips, where I’m wrong? Thanks!

I put it on gdf child theme / functions.php , before the final ?>


// begin change order tabs //
/** https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-24021 **/

add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ;

function geodir_detail_page_tab_list_extend($tab_array)
{
 // here u can modify this array, u can create a completely new one too.
     if(isset($tab_array['reviews'])){
         $new_tab_array['reviews'] = $tab_array['reviews'];// set in new array
$new_tab_array['reviews']['is_active_tab']='1';
		 unset($tab_array['reviews']);//unset in old one
	 }
     if(isset($tab_array['post_profile'])){
         $new_tab_array['post_profile'] = $tab_array['post_profile']; // set in new array
		 unset($tab_array['post_profile']);//unset in old one
	 }

     if(isset($tab_array['post_map'])){
         $new_tab_array['post_map'] = $tab_array['post_map'];// set in new array
		 unset($tab_array['post_map']);//unset in old one
	 }

    if(isset($tab_array['special_offers'])){
         $new_tab_array['special_offers'] = $tab_array['special_offers'];// set in new array
		 unset($tab_array['special_offers']);//unset in old one
	}

     if(isset($tab_array['post_info'])){
         $new_tab_array['post_info'] = $tab_array['post_info'];// set in new array
		 unset($tab_array['post_info']);//unset in old one
	 }

    if(isset($tab_array['post_images'])){
         $new_tab_array['post_images'] = $tab_array['post_images'];// set in new array
		 unset($tab_array['post_images']);//unset in old one
	}

    if(isset($tab_array['post_video'])){
         $new_tab_array['post_video'] = $tab_array['post_video'];// set in new array
		 unset($tab_array['post_video']);//unset in old one
	}

     if(isset($tab_array['special_offers'])){
         $new_tab_array['special_offers'] = $tab_array['special_offers'];// set in new array
		 unset($tab_array['special_offers']);//unset in old one
	 }

     

	// now we set any remaining tabs that have not been assigned an order
	foreach($tab_array as $key=>$tab){
	$new_tab_array[$key]=$tab;
	}

    return $new_tab_array ;
}

// end change order tabs //
]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-31820 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-31820 Mon, 23 Feb 2015 21:52:33 +0000 Paolo Hi,

as Stiofan suggested, please try:


// begin change order tabs //
/** https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-24021 **/

add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ;

function geodir_detail_page_tab_list_extend($tab_array)
{
 // here u can modify this array, u can create a completely new one too.
     if(isset($tab_array['reviews'])){
         $new_tab_array['reviews'] = $tab_array['reviews'];// set in new array
$new_tab_array['reviews']['is_active_tab']='1';
		 unset($tab_array['reviews']);//unset in old one
	 }
     if(isset($tab_array['post_profile'])){
         $new_tab_array['post_profile'] = $tab_array['post_profile']; // set in new array
 $new_tab_array['post_profile']['is_active_tab']='';
		 unset($tab_array['post_profile']);//unset in old one
	 }

     if(isset($tab_array['post_map'])){
         $new_tab_array['post_map'] = $tab_array['post_map'];// set in new array
		 unset($tab_array['post_map']);//unset in old one
	 }

    if(isset($tab_array['special_offers'])){
         $new_tab_array['special_offers'] = $tab_array['special_offers'];// set in new array
		 unset($tab_array['special_offers']);//unset in old one
	}

     if(isset($tab_array['post_info'])){
         $new_tab_array['post_info'] = $tab_array['post_info'];// set in new array
		 unset($tab_array['post_info']);//unset in old one
	 }

    if(isset($tab_array['post_images'])){
         $new_tab_array['post_images'] = $tab_array['post_images'];// set in new array
		 unset($tab_array['post_images']);//unset in old one
	}

    if(isset($tab_array['post_video'])){
         $new_tab_array['post_video'] = $tab_array['post_video'];// set in new array
		 unset($tab_array['post_video']);//unset in old one
	}

     if(isset($tab_array['special_offers'])){
         $new_tab_array['special_offers'] = $tab_array['special_offers'];// set in new array
		 unset($tab_array['special_offers']);//unset in old one
	 }

     

	// now we set any remaining tabs that have not been assigned an order
	foreach($tab_array as $key=>$tab){
	$new_tab_array[$key]=$tab;
	}

    return $new_tab_array ;
}

// end change order tabs //

You were missing the


$new_tab_array['post_profile']['is_active_tab']='';

in post profile to make the tab inactive.

Let us know,

Thx

]]>
https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-32235 <![CDATA[Reply To: How to change default tab (from profile to review)?]]> https://wpgeodirectory.com/support/topic/how-to-change-default-tab-from-profile-to-review/#post-32235 Fri, 27 Feb 2015 09:45:20 +0000 magnaromagna Works fine now, thank you

]]>