Split: Possible to re-order tabs in whoop?

This topic contains 8 replies, has 4 voices, and was last updated by  Giri 8 years, 11 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #64054

    Trex888
    Expired Member
    Post count: 101

    Hi,

    Trying to do the same, re-order tabs in Whoop theme but having some issues. I’ve added the following to my Child Themes functions.php file:

    remove_filter('geodir_detail_page_tab_list_extend', 'geodir_detail_page_tab_list_extend');

    Then added this below it (the first tab being a custom tab):

    
    
    add_filter('geodir_detail_page_tab_list_extend', 'jkirker_geodir_detail_page_tab_list_extend');
    function jkirker_geodir_detail_page_tab_list_extend($tab_array)
    {
        global $preview;
        if ($preview) {
            return $tab_array;
        }
        $new_tab_array = array();
        // here u can modify this array, u can create a completely new one too.
     if (isset($tab_array['gd_tab_1'])) {
            $new_tab_array['gd_tab_1'] = $tab_array['gd_tab_1'];// set in new array
            $new_tab_array['gd_tab_1']['is_active_tab'] = '1';
            unset($tab_array['gd_tab_1']);//unset in old one
        }   
    
     if (isset($tab_array['post_profile'])) {
            $new_tab_array['post_profile'] = $tab_array['post_profile']; // set in new array      
            unset($tab_array['post_profile']);//unset in old one
        }
    
     if (isset($tab_array['reviews'])) {
            $new_tab_array['reviews'] = $tab_array['reviews'];// set in new array       
            unset($tab_array['reviews']);//unset in old one
        }
       
    
        if (isset($tab_array['post_map'])) {
            $new_tab_array['post_map'] = $tab_array['post_map'];// set in new array
            unset($tab_array['post_map']);//unset in old one
        }
    
        if (isset($tab_array['special_offers'])) {
            $new_tab_array['special_offers'] = $tab_array['special_offers'];// set in new array
            unset($tab_array['special_offers']);//unset in old one
        }
    
        if (isset($tab_array['post_info'])) {
            $new_tab_array['post_info'] = $tab_array['post_info'];// set in new array
            unset($tab_array['post_info']);//unset in old one
        }
    
        if (isset($tab_array['post_images'])) {
            $new_tab_array['post_images'] = $tab_array['post_images'];// set in new array
            unset($tab_array['post_images']);//unset in old one
        }
    
        if (isset($tab_array['post_video'])) {
            $new_tab_array['post_video'] = $tab_array['post_video'];// set in new array
            unset($tab_array['post_video']);//unset in old one
        }
    
        if (isset($tab_array['special_offers'])) {
            $new_tab_array['special_offers'] = $tab_array['special_offers'];// set in new array
            unset($tab_array['special_offers']);//unset in old one
        }
    
        // now we set any remaining tabs that have not been assigned an order
        foreach ($tab_array as $key => $tab) {
            $new_tab_array[$key] = $tab;
        }
    
        return $new_tab_array;
    }

    When I navigate to a details page, my custom tab is the default open tab but it’s still ordered last (farthest right). That and the details page url shows as:

    http://www.mysite.com/place/united-states/new-york/buffalo/fesitvals/test-festival/#gd_tab_1

    Note the ending “#gd_tab_1”.

    How do I get my custom tab to display as the first tab (farthest left) and the url not include #gd_tab_1?

    Thanks for any help with this,

    T

    #64117

    Paolo
    Site Admin
    Post count: 31206

    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!

    #64123

    Trex888
    Expired Member
    Post count: 101
    This reply has been marked as private.
    #64178

    Giri
    Expired Member
    Post count: 3155

    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!

    #64251

    Trex888
    Expired Member
    Post count: 101
    This reply has been marked as private.
    #64335

    Giri
    Expired Member
    Post count: 3155

    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!

    #64352

    Trex888
    Expired Member
    Post count: 101

    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!

    #64455

    jkirker
    Lifetime Member
    Post count: 298

    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!

    #64647

    Giri
    Expired Member
    Post count: 3155

    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!

Viewing 9 posts - 1 through 9 (of 9 total)

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

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount