I found the script for adding tabs to the listings but I need certain tabs to show only on certain categories. Like a “Menu” tab for Restaurants. Obviously, a “Menu” tab wouldn’t be appropriate for a Painter. Here’s is the code for adding tabs. Is there anything I can do to make this work the way I need?
add_filter(‘geodir_detail_page_tab_list_extend’, ‘geodir_detail_page_tab_list_extend’);
function geodir_detail_page_tab_list_extend($tab_array) {
if ( ‘gd_event’ == get_post_type() )
$tab_array[‘my_new_tab’] = array(
‘heading_text’ => __(‘New Tab’,GEODIRECTORY_TEXTDOMAIN),
‘is_active_tab’ => false,
‘is_display’ => apply_filters(‘geodir_detail_page_tab_is_display’, true,’my_new_tab’),
‘tab_content’ => ”);
return $tab_array ; }