Shortcode to remove Links in Tabs when in list view

This topic contains 6 replies, has 4 voices, and was last updated by  Alex Rollin 5 years, 8 months ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #480808

    BJ Bowen
    Full Member
    Post count: 73

    Using this shortcode for tabs on the details page:
    [gd_single_tabs show_as_list=”1″]

    The tab headers all have links. Is there something I can add to the shortcode that will remove the link?

    #480841

    Kor
    Moderator
    Post count: 16516

    Hi BJ Bowen,

    Thanks for your post. This can be adjusted using custom CSS. Could you share your Website URL here in question?

    #480853

    BJ Bowen
    Full Member
    Post count: 73

    I can do it with CSS, but it really shouldn’t be there. That’s not good for SEO.

    Is there any way you guys can fix that? I see several people are requesting this.

    #480928

    Kor
    Moderator
    Post count: 16516

    Hi BJ Bowen,

    Thanks for your reply. Will forward this to a developer for a second opinion.

    Thanks!

    #481277

    Kiran
    Moderator
    Post count: 7069

    Hello BJ,

    Try following coe snippet to remove link from the detail page tab title.

    
    
    /**
     * Remove link from detail page tabs title.
     */
    function gd_snippet_190417_remove_tab_link( $tab_title, $tab ) {
    	if ( ! empty( $tab->tab_icon ) ) {
    		$tab_icon = '<i class="fas ' . esc_attr( $tab->tab_icon ) . '" aria-hidden="true"></i>';
    	} else {
    		$tab_icon = '';
    	}
    
    	$tab_title = '<span class="gd-tab-list-title" >' . $tab_icon . esc_attr__( $tab->tab_name, 'geodirectory' ) . '</span><hr />';
    
    	return $tab_title;
    }
    add_filter( 'geodir_tab_list_title', 'gd_snippet_190417_remove_tab_link', 10, 2 );

    Regards,
    Kiran

    #481630

    BJ Bowen
    Full Member
    Post count: 73

    Thank you! That worked!

    Now, the title of the listing is the only thing that doesn’t make sense because it just links to itself. Any ideas on what to do about that?

    #481650

    Alex Rollin
    Moderator
    Post count: 27815

    Are you using GD Post Title? Try GD Post Meta for key post_title instead.

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