Hi Yushan,
Yes, this can be achieved by using the code below. Please insert this into your child theme functions.php file. To set a default tab, insert “[‘is_active_tab’]=’1′” into a “$new_tab_array“. Example, check out the “reviews” section below.
function override_whoop_filters() {
remove_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend');
add_filter('geodir_detail_page_tab_list_extend', 'my_geodir_detail_page_tab_list_extend');
}
add_action('init', 'override_whoop_filters');
function my_geodir_detail_page_tab_list_extend($tab_array)
{
global $preview;
if ($preview) {
return $tab_array;
}
$new_tab_array = array();
// here u can modify this array, u can create a completely new one too.
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['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_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['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_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_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;
}