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.