I followed the documentation from (https://wpgeodirectory.com/add-a-new-tab-in-the-listing-detail-page/) and added the code to my theme’s functions.php file. The code works fine but, when I use the code to limit the new tab to my custom post type gd_events, the tab disappears.
Here is the code that should work but, does not:
if ( ‘gd_event’ == get_post_type() )
{ add_filter(‘geodir_detail_page_tab_list_extend’, ‘geodir_detail_page_tab_list_extend’) ; }
function geodir_detail_page_tab_list_extend($tab_array) {
$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 ; }