Add New Tab Issues
This topic contains 15 replies, has 4 voices, and was last updated by Alex Rollin 7 years, 1 month ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
February 26, 2018 at 9:31 am #419233
Hi Guust,
Sorry to bug you and your team again. Implementing GD on another site using Enfold Theme, and am having issues with the “Add a New Tab” to the listing page. See attached file for further details.
I created a tab for the 3D FlipBook – Light Edition plugin. The plugin shortcode does not work in the “Flipbook” content, but it works in the “Profile” content.
Please refer to the attached file for further details. Below are the codes used. I got them from https://wpgeodirectory.com/add-a-new-tab-in-the-listing-detail-page/
————————————————————————————————–
/*Add a new tab to GD listing 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[‘my_new_tab’] = array(
‘heading_text’ => __(‘Flipbook’,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 ; }add_action(‘geodir_after_tab_content’ ,’geodir_my_new_tab_content’);
function geodir_my_new_tab_content($tab_index)
{
if($tab_index ==’my_new_tab’)
{echo “Flipbook!”;}
}
——————————————————————————————————–Am I missing codes? Any suggestions to resolve the issues is greatly appreciated.
With much thanks,
Nik
February 26, 2018 at 10:16 am #419238Hi Nik,
Thanks for your reply. Is should work if you’ve followed the steps correctly like this example https://wpgeodirectory.com/formidable-forms-in-geodirectory-tabs/ . Please share the URL of the site in question so we can take a better look at it and also WP temp admin access to your site. You can post the details here using the private reply option below.
February 27, 2018 at 8:17 am #419401Hi Kor,
Appreciate your quick follow up. I prefer not to add another plugin to the site. Below are the tab issues as well as the location switcher issue in mobile view. The site is currently in development. The temp admin access will be sent in private reply following this mail.
1) NEW TAB ISSUE – How to resolve it? Need to add the new tab, “Flipbook” to all Custom Post Types.
I took out the codes I inserted yesterday and replace them with the codes below. When I added the codes below to the enfold child theme functions.php I ran into a Parse error: syntax error, unexpected ‘}’
——————————————————————————————
/*Add a new tab to GD listing 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[‘my_new_tab’] = array(
‘heading_text’ => __(‘Flipbook’,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 ; }
add_action(‘geodir_after_tab_content’ ,’geodir_my_new_tab_content’);
function geodir_my_new_tab_content($tab_index)
{
if($tab_index ==’my_new_tab’)
{echo do_shortcode(‘[id=”3d-flip-book” title=”false”]’);}
}———————————————————————————————-
2) ADD ANOTHER 2 NEW TABS – What are the codes required?
3) ADD FRANCHISE CHANGE TO ALL CUSTOM POST TYPES. Are the codes below correct?
function geodir_franchise_change_franchises_tab_text($text, $post_type) {
if ($post_type == ‘gd_place’,’gd_service’,’gd_lifestyle’) {
$text = __(‘Branches’, ‘geodir-franchise’);
}
return $text;
}
add_filter( ‘geodir_franchise_franchises_tab_text’,
‘geodir_franchise_change_franchises_tab_text’, 10, 2 );
function geodir_franchise_change_all_link_text($text, $post_type) {
if ($post_type == ‘gd_place’,’gd_service’,’gd_lifestyle’) {
$text = __(‘View all branches’, ‘geodir-franchise’);
}
return $text;
}
add_filter( ‘geodir_franchise_all_franchises_link_text’,
‘geodir_franchise_change_all_link_text’, 10, 2 );
function geodir_franchise_change_add_link_text($text, $post_type) {
if ($post_type == ‘gd_place’,’gd_service’,’gd_lifestyle’) {
$text = __(‘Add Branch’, ‘geodir-franchise’);
}
return $text;
}
add_filter( ‘geodir_franchise_add_franchise_link_text’,
‘geodir_franchise_change_add_link_text’, 10, 2 );4) LOCATION SWITCHER DOES NOT WORK IN MOBILE VIEW.
Thanks for your help.
Nik
February 27, 2018 at 8:20 am #419402This reply has been marked as private.February 27, 2018 at 8:42 am #419407This reply has been marked as private.February 27, 2018 at 1:30 pm #419492Hello,
I have flagged your question for the developers to see if there is an easy fix. Thanks for your patience while they look into it.
February 27, 2018 at 3:24 pm #419556This reply has been marked as private.February 27, 2018 at 6:17 pm #419591This reply has been marked as private.March 1, 2018 at 9:46 am #419853This reply has been marked as private.March 1, 2018 at 12:44 pm #419869Can u give me the url of a listing where these tabs are supposed to show?
Stiofan
March 1, 2018 at 8:08 pm #419919This reply has been marked as private.March 2, 2018 at 12:22 pm #420010Hi Nik,
I don’t see any of the tabs on those pages?
I thought you had added the tabs but they were empty?We can’t do customizations for you, we can only help with examples of how to use our filters, which in this case there are many examples of how to use them.
Stiofan
March 5, 2018 at 12:01 pm #420345Hi Stiofan,
Sorry, the tabs were removed. Ran into php errors. I’ve revised the codes and added them back. This time, only one new tab (Flipbook) display, instead of two.
However, the text or shortcode in the Flipbook tab does not display. Am I missing codes or is the fatal error the cause of the issue. See attached php test.
WP admin access remain the same. Any suggestions to resolve the issues are much appreciated.
Thanks,
Nik
March 5, 2018 at 3:45 pm #420381For issues with customization you can contact a GD Expert here:
https://geodirectoryexperts.comMarch 5, 2018 at 11:26 pm #420436Hi Alex,
Thanks for responding back. I’m not ready to engage a GD Expert. I have scoured the forum endlessly, and found different codes. Codes on the forum may have changed over time with GD plugin updates.
All I wanted to know was if the codes are still valid – and if not, are they the cause of the issues – and if there any suggestions to resolve the problems or at least point me to links where I can find a solution to resolve the issues.
Stiofan was looking into the issues.
At this point, I’m About to Give Up on GeoDirectory.
Below are the links I have reviewed for a solution to adding a new tab.
https://wpgeodirectory.com/add-a-new-tab-in-the-listing-detail-page/
https://wpgeodirectory.com/support/topic/new-tab-for-custom-field-and-tabs/
https://wpgeodirectory.com/support/topic/add-a-new-tab-in-the-listing-detail-page/
https://wpgeodirectory.com/docs/core-place-settings/#fieldset
https://wpgeodirectory.com/support/topic/adding-new-tab-with-translation/
https://wpgeodirectory.com/support/topic/adding-new-tab-to-listing-details/
https://wpgeodirectory.com/re-order-tabs-in-a-listing-detail-page/I had assessed many directory plugins and themes before deciding on giving GeoDirectory a try. GeoDirectory’s reviews sold me. https://wpgeodirectory.com/best-wordpress-directory-theme/
Your initial customer service was great. Guust was excellent.
If GeoDirectory customer support is unable to assist, let me know ASAP.
Thanks,
Nik
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket