Hello,
I’d like to move our images into the Profile tab. I tried this snippet but it didn’t work.
add_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend_profile') ;
function geodir_detail_page_tab_list_extend_profile($tab_array)
{ global $post;
// here is where we check the tab we want has info and then assign it to a global $post value.
// you would change the 'gd_tab_3' to your tab key.
if(isset($tab_array['post_images']['tab_content']) && $tab_array['post_images']['tab_content']){
$post->my_profile_extend = $tab_array['post_images']['tab_content']; // assign the content to global value
$tab_array['post_images']['is_display']= false;// don't display the tab
}
// here we call a function that will get the global value and echo it.
add_action('geodir_after_description_on_listing_detail','gd_extra_profile_tab_info');
return $tab_array;
}
// function that will get the global value and echo it.
function gd_extra_profile_tab_info(){
global $post;
if(isset($post->my_profile_extend) && $post->my_profile_extend){echo $post->my_profile_extend;}
}
Can you tell me where I went wrong in the code… or maybe it would be easier to use CSS to hide the Image Tab title and
<hr>
. I tried a couple of CSS options but I was not able to come up with the correct tab class or id that would work.
Overall just trying to give appearance that images are part of business description section. Here’s an example listing if needed: https://rvtravelguidebook.com/restaurants/wyoming/alpine/delish-donuts-coffee/
Appreciate the assistance!
Mike