GeoDirectory SupportExtra Tab on Details Page – GeoDirectory Support https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/feed Fri, 13 Feb 2026 12:22:51 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37674 <![CDATA[Extra Tab on Details Page]]> https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37674 Mon, 20 Apr 2015 16:44:43 +0000 Sara Graybill I’ve created an extra tab on the details page for my product_providers CPT. I’ve used the following code to add it:


//Directory Details Page
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['company-information'] = array( 
		'heading_text' =>  __('Company Information',GEODIRECTORY_TEXTDOMAIN),
		'is_active_tab' => false,
		'is_display' =>  apply_filters('geodir_detail_page_tab_is_display', true, 'company-information'),
		'tab_content' => ''
		);
	return $tab_array ;
}

add_action('geodir_after_tab_content' ,'geodir_my_new_tab_content');
function geodir_my_new_tab_content($tab_index)
{
	global $post; 

	if($tab_index =='company-information')
	{
		global $wpdb;
        	$id = get_the_ID();
        	$companydescription = $wpdb->get_var("SELECT geodir_products_companyname FROM geodir_gd_product_providers_detail WHERE post_id = $id ");

     		echo $companydescription;    
	}
}

The tab shows up fine and when I add straight text it works. It doesn’t when I’ve tried to add the custom field products_companyname. I was just wondering if you all knew what was wrong.

]]>
https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37677 <![CDATA[Reply To: Extra Tab on Details Page]]> https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37677 Mon, 20 Apr 2015 17:19:12 +0000 Simone

A valid license is required to view this reply.

You may need to login

OR

Buy either a Membership or valid license for this product.

Thanks, Team GeoDirectory!

]]>
https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37699 <![CDATA[Reply To: Extra Tab on Details Page]]> https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37699 Mon, 20 Apr 2015 19:39:39 +0000 Sara Graybill

A valid license is required to view this reply.

You may need to login

OR

Buy either a Membership or valid license for this product.

Thanks, Team GeoDirectory!

]]>
https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37702 <![CDATA[Reply To: Extra Tab on Details Page]]> https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37702 Mon, 20 Apr 2015 20:38:21 +0000 Sara Graybill https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37738 <![CDATA[Reply To: Extra Tab on Details Page]]> https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37738 Tue, 21 Apr 2015 12:25:26 +0000 Simone

A valid license is required to view this reply.

You may need to login

OR

Buy either a Membership or valid license for this product.

Thanks, Team GeoDirectory!

]]>
https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37739 <![CDATA[Reply To: Extra Tab on Details Page]]> https://wpgeodirectory.com/support/topic/extra-tab-on-details-page/#post-37739 Tue, 21 Apr 2015 12:25:49 +0000 Simone