GeoDirectory SupportReordering tabs one tab isn't showing – GeoDirectory Support https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/feed Thu, 05 Mar 2026 23:59:21 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-54621 <![CDATA[Reordering tabs one tab isn't showing]]> https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-54621 Sat, 26 Sep 2015 10:27:46 +0000 mrchocolate I have tried to reorder the tabs, using the tutorial on the blog, on my site largefamilyaccommodation.com and the reviews tab (which i have renamed “write reviews”) isn’t showing up.

Here is the code i have added to my functions.php:


// This is the add filter action which will use the function below to re-order tabs. 
add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend') ;
 
//This is the actual function to re-order tabs
function geodir_detail_page_tab_list_extend($tab_array)
{
 
// before creating the new array which will re-order the tabs, we check if the custom post type is "Places"
 
if ( 'gd_place' == get_post_type() ) {
 
 // here you can modify the array and re-arrange tabs as you wish, you can create a completely new array too.
 
    // this is the review tab, by default is the 7th, but here we moved it to position 1.
    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
     }
 
    // this is the post profile tab, by default is the 1st
    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
     }
 
    // this is the post info tab (optional for custom fields), by default, if available, is the 2nd.
    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
     }
    // this is the images tab, by default is the 3rd
    if(isset($tab_array['gd_tab_2'])){
         $new_tab_array['gd_tab_2'] = $tab_array['gd_tab_2'];// set in new array
         unset($tab_array['gd_tab_2']);//unset in old one
    }
 
    // this is the video tab, appears only if there are videos and by default is the 4th
     if(isset($tab_array['gd_tab_1'])){
         $new_tab_array['gd_tab_1'] = $tab_array['gd_tab_1'];// set in new array
         unset($tab_array['gd_tab_1']);//unset in old one
    }
 
    // this is the speacial offer tab, appears only if there are special offers and by default is the 5th
    if(isset($tab_array['gd_tab_3'])){
         $new_tab_array['gd_tab_3'] = $tab_array['gd_tab_3'];// set in new array
         unset($tab_array['gd_tab_3']);//unset in old one
     }
 
    // this is the map tab, by default is the 6th
    if(isset($tab_array['reviews'])){
         $new_tab_array['reviews'] = $tab_array['reviews '];// set in new array
         unset($tab_array['reviews']);//unset in old one
     }
 
    // this is the related listing tab, it is optional and by default is the 8th
    if(isset($tab_array['related_listing'])){
        $new_tab_array['related_listing'] = $tab_array['related_listing'];// set in new array
        unset($tab_array['related_listing']);//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 ; } // If Check for Places ends here 
 
// Here we tell GeoDirectory to use the regular array for all other custom post types.
else { return $tab_array ;  }
 
}

The listing which i have been playing around is http://largefamilyaccommodation.com/accommodation/australia/victoria/hepburn-springs-1/sleeps12/little-auberge/#post_profile.

]]>
https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-54790 <![CDATA[Reply To: Reordering tabs one tab isn't showing]]> https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-54790 Mon, 28 Sep 2015 10:26:44 +0000 mrchocolate I am wondering if you have seen this. Could you please help me?

]]>
https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-54867 <![CDATA[Reply To: Reordering tabs one tab isn't showing]]> https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-54867 Mon, 28 Sep 2015 16:23:53 +0000 Paolo Hi,

in that code the review tab is not changed. Please provide admin credentials and we will have a look.

Thanks

]]>
https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-55700 <![CDATA[Reply To: Reordering tabs one tab isn't showing]]> https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-55700 Mon, 05 Oct 2015 06:34:06 +0000 mrchocolate https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-55821 <![CDATA[Reply To: Reordering tabs one tab isn't showing]]> https://wpgeodirectory.com/support/topic/reordering-tabs-one-tab-isnt-showing/#post-55821 Mon, 05 Oct 2015 18:57:10 +0000 Paolo Hi,

if you notice you had a space after the tab index.

$new_tab_array['reviews'] = $tab_array['reviews '];// set in new array

That shouldn’t be there. I changed it to:

$new_tab_array['reviews'] = $tab_array['reviews'];// set in new array

and it works.

Thanks

]]>