GeoDirectory SupportModify display of website link so address is visible – GeoDirectory Support https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/feed Tue, 03 Feb 2026 10:13:48 +0000 http://bbpress.org/?v=2.5.14-6684 en-US https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12733 <![CDATA[Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12733 Thu, 21 Aug 2014 13:00:32 +0000 purpleedge Hi,

I was setting up a print.css today and I see the the actual website address of a listing isn’t displayed, and there is no easy way to change it because it is buried in heap of code.

I wonder if you can change the line in the code in custom_fields_functions 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.''.stripslashes(__($type['site_title'],GEODIRECTORY_TEXTDOMAIN)).'<span class="geodir_website_address">' . $website . '</span></span></div>';

So that the website address is displayed and can be formatted, or hidden as necessary. Or give us a hook so we can do this ourselves?

]]>
https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12744 <![CDATA[Reply To: Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12744 Thu, 21 Aug 2014 17:48:01 +0000 Simone Hi, I’ve alerted Stiofan.

]]>
https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12750 <![CDATA[Reply To: Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12750 Thu, 21 Aug 2014 19:19:23 +0000 Paolo Hi,

Stiofan added a filter. Please replace custom_fields_functions.php with the file in the zip attached.

Filter to be used like this for example in your active theme functions.php add :


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){
 return $website; 
 }

New filter will be added to the next version.

Thx

]]>
https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12802 <![CDATA[Reply To: Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12802 Thu, 21 Aug 2014 23:46:09 +0000 purpleedge Thanks very much! Can I be a pain?

Can you take the “strong” out?

$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.’‘.apply_filters( ‘geodir_custom_field_website_name’, stripslashes(__($type[‘site_title’],GEODIRECTORY_TEXTDOMAIN)),$website, $post->ID ).’</span></div>’;

]]>
https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12812 <![CDATA[Reply To: Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12812 Fri, 22 Aug 2014 00:36:54 +0000 Paolo that can done with css?

.geodir_more_info strong {font-weight:normal;}
]]>
https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12815 <![CDATA[Reply To: Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12815 Fri, 22 Aug 2014 00:47:53 +0000 purpleedge Hi Paolo,

Well, it’s just as easy to add the strong 😉

But no, I want the display like in my original image, or without the strong anywhere so it matches the other display fields on the detail page.

/* Change the way website link is displayed on detail page –*/
function geodir_change_website_field_display_name($name,$website,$post_id){
return ‘‘ . $name . ‘<span class=”geodir_website_address”>’ . $website . ‘</span>’;
}
add_filter( ‘geodir_custom_field_website_name’, ‘geodir_change_website_field_display_name’, 10, 3 );

Produces…

<div class=”geodir_more_info geodir_website”>
<span class=”geodir-i-website” style=””>
<i class=”fa fa-link”></i>

Website
<span class=”geodir_website_address”>
http://buy4baby.com.au</span&gt;

</span>
</div>

</div>

…Which is perfect, and flexible for everybody! There is no way to get rid of the strong from the label otherwise.

]]>
https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12856 <![CDATA[Reply To: Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12856 Fri, 22 Aug 2014 09:15:02 +0000 Stiofan O'Connor Hi purple, when trying to paste code here please wrape it in the code tags (just highlight the code and then click the “code” button in the test editor)

As far as i can see all you have to do is add

.geodir_website strong{font-weight: normal;}

Stiofan

]]>
https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12882 <![CDATA[Reply To: Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-12882 Fri, 22 Aug 2014 13:06:03 +0000 purpleedge Hi Stiofan, sorry tried to post it in blockquotes and pre, will try in code.

I was just trying to separate the formatting of the “label” from the url, if you keep the strong in there then everything is strong, if you leave it out then we can decide if one part is strong – like my image.


/* Change the way website link is displayed on detail page --------------------*/
function geodir_change_website_field_display_name($name,$website,$post_id){
    return '<strong>' . $name . '</strong><span class="geodir_website_address">' . $website . '</span>';
}
add_filter( 'geodir_custom_field_website_name', 'geodir_change_website_field_display_name', 10, 3 );

produces…


<a target="_blank" href="http://buy4baby.com.au">
        <strong>

            Website

        </strong>
        <span class="geodir_website_address">

            http://buy4baby.com.au

        </span>
    </a>

…a bit more flexibility. See image above.

]]>
https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-13288 <![CDATA[Reply To: Modify display of website link so address is visible]]> https://wpgeodirectory.com/support/topic/modify-display-of-website-link-so-address-is-visible/#post-13288 Wed, 27 Aug 2014 03:29:11 +0000 purpleedge Thanks guys,

I managed to get the website address to display like every other link in the sidebar with this css…

#top span.geodir_website_address {
font-weight:normal;
color: #889095;
}
#top span.geodir_website_address:hover {
font-weight:normal;
color: #c79a52;
}

…would’ve been easier without the

<strong>

😉

]]>