Move Images into Profile Tab

This topic contains 4 replies, has 2 voices, and was last updated by  Michael Sena 6 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #412425

    Michael Sena
    Buyer
    Post count: 72

    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

    #412443

    Kor
    Moderator
    Post count: 16516

    Hi Mike,

    Could you try this custom CSS and see if it helps? Insert into GD > Design > Style > Custom Style CSS

    
    
    #post_imagesTab span.gd-tab-list-title{
    
        display:none!important;
    }
    
    #post_imagesTab > hr {
    
        display:none!important;
    }
    #412591

    Michael Sena
    Buyer
    Post count: 72

    Yes…that worked beautifully…thank you Kor!

    #412616

    Kor
    Moderator
    Post count: 16516
    This reply has been marked as private.
    #412656

    Michael Sena
    Buyer
    Post count: 72
    This reply has been marked as private.
Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket