I added a new tab. Now to organize…
This topic contains 11 replies, has 3 voices, and was last updated by Paolo 9 years, 7 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
February 6, 2015 at 1:25 am #30159
Hello ,
I added a new Tab per your instructions and now I went to reorganize according to your instructions. This obviously didn’t work because I need to account for the new tab. Can you guide me on this?
Thanks!
February 6, 2015 at 9:26 am #30169How did you add the new tab?
Are these the instructions you followed?
WP admin details please if you want us to have a check.February 6, 2015 at 2:42 pm #30185This reply has been marked as private.February 6, 2015 at 6:51 pm #30216Did you see this? https://wpgeodirectory.com/support/topic/exclude-selected-tabs-from-detail-page-if-empty/#post-7305
Let us know,
Thx
February 6, 2015 at 9:49 pm #30240Yes,
I think it didn’t work because I added a custom tab. I researched a lot.February 6, 2015 at 10:13 pm #30245Can you please paste your function here? Thx
p.s. and FYI : this is a customization, we provide tutorials to make similar changes, but we don’t debug your custom code on your behalf as part of support here. If you want to modify how the plugin works, you are supposed to know how to debug a function.
February 6, 2015 at 11:17 pm #30251This reply has been marked as private.February 6, 2015 at 11:24 pm #302521st thing that I notice is that this :
if(isset($tab_array['specials'])){ $new_tab_array['related_listing'] = $tab_array['specials'];// set in new array unset($tab_array['specials']);//unset in old one }
should be
if(isset($tab_array['specials'])){ $new_tab_array['special'] = $tab_array['specials'];// set in new array unset($tab_array['specials']);//unset in old one }
Let us know,
February 7, 2015 at 12:24 am #30254Thanks for looking..
Nothing changed at all. What am I missing here?
February 7, 2015 at 6:15 pm #30276Hi,
there are 2 big mistakes.
1st The comment
/***************************************************ReOrderTabs*******************************************************
was not closed with a / and all code below wasn’t excecuted.
2nd you were using 2 hooks/functions to add and reorder tabs and both have the same names:
add_filter(‘geodir_detail_page_tab_list_extend’, ‘geodir_detail_page_tab_list_extend’) ; function geodir_detail_page_tab_list_extend($tab_array) { // code here }
While you only needed 1 hook/function to add and reorder tabs at once, by adding the code below where ever u want it in the function to re-order tabs and deleting the 1st function to add the tab:
$new_tab_array['specials'] = array( 'heading_text' => __('$10 LUNCH! Menu',GEODIRECTORY_TEXTDOMAIN), 'is_active_tab' => false, 'is_display' => apply_filters('geodir_detail_page_tab_is_display', true, 'specials'), 'tab_content' => '' );
Needs to be $new_tab_array.
I’ve added it correctly to your website. Next time for a similar customization you should directly post in the Jobs forum.
Thank you
February 10, 2015 at 3:58 am #30515Thank you for your help! I notice two things now.
#1 for some reason, my “review” tab is empty.
#2 while I selected my first tab to be active, I can’t seem to disable the profile tab from being active.
February 10, 2015 at 6:46 pm #305941 ) GeoDirectory listings are wordpress custom post types and reviews are comments, so the plugin “Simple No Comment” will not work for your needs, unless it allows to select for which post type comments are disabled.
2 ) You need to unset the post_profile tab from being active.
if(isset($tab_array['post_profile'])){ $new_tab_array['post_profile'] = $tab_array['post_profile']; // set in new array $new_tab_array['post_profile']['is_active_tab']=''; unset($tab_array['post_profile']);//unset in old one }
Thanks
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket