Display URL instead of text for FB, Instagram etc

This topic contains 4 replies, has 4 voices, and was last updated by  Timothy Sullivan 7 years, 2 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #400546

    Timothy Sullivan
    Buyer
    Post count: 63

    HI,
    I found this function to display the place website URL instead of the word “website” on the details page.

    
    
    add_filter( 'geodir_custom_field_website_name', 'geodir_change_website_field_display_name', 10, 3 ); 
    function geodir_change_website_field_display_name($name,$website,$post_id){
    if($name=='Website'){return $website ; }
    else{return $name;}
    }
    

    I would like to do the same for Facebook, Instagram, twitter and youtube. Is there a way to do this with a similar function? see attached screenshot for an example

    #400581

    Guust
    Moderator
    Post count: 29970

    I’ll get a developer to have a closer look for you.
    Thanks

    #400616

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    You can make a feature request for this here: https://wpgeodirectory.com/requests/

    We will look at this for future versions.

    #400634

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    This should do it:

    
    
    add_filter( 'geodir_custom_field_website_name', 'geodir_change_website_field_display_name', 10, 3 ); 
    function geodir_change_website_field_display_name($name,$website,$post_id){
    if($name=='Facebook' || $name=='Twitter' || $name=='Instagram' || $name=='Website'){return $website ; }
    else{return $name;}
    }

    Thanks,

    Stiofan

    #400668

    Timothy Sullivan
    Buyer
    Post count: 63

    Thank You Stiofan, that works perfectly.

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
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount