Custom Tab On Listing With Link On Click?

This topic contains 3 replies, has 3 voices, and was last updated by  Fiskani Chirwa 10 years, 3 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #24218

    dnosker
    Buyer
    Post count: 68

    Greetings,

    I have found examples of creating custom tabs on listings and even inserting content inside the tab when clicked… However, I am wanting to create a custom tab and when the user clicks the tab it instead acts as a link to another page. (Perhaps using a url stored in a field for the listing.)

    Any source example on how I could do this?

    Thanks Much!

    #24221

    Simone
    Expired Member
    Post count: 3515

    you should be good to go with this (place it in your child theme’s functions.php)

    
    
    add_filter('geodir_detail_page_tab_list_extend', 'tab_link') ;
    
    function tab_link($tab_link)
    {
    	$custom_url= geodir_get_post_meta($postid,'geodir_customurl',true); 
    
     	$tab_link['tab_link'] = array( 
    										'heading_text' =>  __('<a href="'.$custom_url.'">TAB LINK</a>',GEODIRECTORY_TEXTDOMAIN),
    										'is_display' =>  apply_filters('geodir_detail_page_tab_is_display', true, 'tab_link')
    									);
    	return $tab_link ;
    }
    

    instructions:
    -create a custom field named customurl and paste an url
    -change the “TAB LINK” to whatever you want to be the text

    #24224

    dnosker
    Buyer
    Post count: 68

    Thanks a million! Will give it a try

    Happy Friday!

    #24229

    Fiskani Chirwa
    Expired Member
    Post count: 29

    Hi dnosker

    Was wondering if you could help me with the custom tab listing?

Viewing 4 posts - 1 through 4 (of 4 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