Changing the Text of Custom Fields Website, Facebook and Twitter

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

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

Open Support Ticket
  • Author
    Posts
  • #66542

    Hefin Dsouza
    Expired Member
    Post count: 48

    When Displaying “Website” , “Twitter” and “Facebook” Custom Fields the output shows as

    “Website” , “Facebook” , “Twitter” and they are linked to the URL the user enters , but I want it to display the URL and it should be hyperlinked..

    For example if the User has entered “http://wpgeo.directory” as the website instead of displaying

    Website it should display as http://wpgeo.directory

    When exploring I came across “geodir_show_listing_info(‘detail’)” function which gets the Content for the Custom Fields.

    As of now I can do one thing which is copy the whole function from the “custom_fields_functions.php” and paste it in the Functions.php and change this

    
    
     $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '"><span class="geodir-i-website" style="' . $field_icon . '">' . $field_icon_af . '<a href="' . $website . '" target="_blank" ' . $rel . ' ><strong>' . apply_filters('geodir_custom_field_website_name', stripslashes(__($type['site_title'], 'geodirectory')), $website, $post->ID) . '</strong></a></span></div>';
    

    to

    
    
     $html = '<div class="geodir_more_info ' . $geodir_odd_even . ' ' . $type['css_class'] . ' ' . $type['htmlvar_name'] . '"><span class="geodir-i-website" style="' . $field_icon . '">' . $field_icon_af . '<a href="' . $website . '" target="_blank" ' . $rel . ' ><strong>' . $website . '</strong></a></span></div>';
    

    Which would give me the desired output but is there an easier way to do it? My functions.php is just becoming bigger and bigger… ;(

    P.S : I think using the language file would still give me a Fixed Text where as here i want the value of the textbox to be visible as the Link title.

    #66543

    Hefin Dsouza
    Expired Member
    Post count: 48

    EDIT

    Instead of doing this I thought of something else but I still need help..

    First im going to disable the Website, Facebook and Twitter links to appear on the More Details Tab.

    Now im thinking of making a new function in the Functions.php calling the required fields and deciding the layout..

    Now the question is How do I make the output of this function appear on the Listing Detail Page just below the Default Description Im using the code from https://wpgeodirectory.com/remove-tabs/ to display the Details in a single tab…

    #66572

    Paolo
    Site Admin
    Post count: 31206

    hi,

    please have a look at this: https://wpgeodirectory.com/support/topic/individual-fields-for-template-of-details-page/#post-51694

    Let us know how you went,

    Thanks

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

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

Open Support Ticket