Geodirectory Custom Field Styling
This topic contains 17 replies, has 4 voices, and was last updated by Carol Chu 8 years, 2 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: custom field
-
AuthorPosts
-
August 29, 2016 at 2:50 pm #255466
Hello,
I have converted some of my custom field options into icons.
The text is exceeding the border and making the icons look strange.
Is there a way to completely get rid of the text instead of just making it invisible or is there a way that I can format it so it doesn’t interfere?
website url example http://www.yycfitness.com/places/calgary/fitness/lagree-yyc/August 29, 2016 at 4:41 pm #255557Hi Carol,
Could you try using the custom CSS below and see if it fixes the issue there? It should remove the border and apply some spacings between the icons. Let us know if it’s what you’re looking for. Insert into GD > Design > Scripts > Custom Style CSS.
.geodir_more_info.geodir_parking, .geodir_more_info.geodir_TransitAccesible { border:none; margin-left:10px; }
Thanks!
August 29, 2016 at 5:27 pm #255644Hi Carol,
Could you take a look at the section of the documentation and try using the checkbox custom field for your icons? https://wpgeodirectory.com/docs/custom-field-examples/ . Looks like the texts can’t be removed by custom CSS.
Thanks!
August 29, 2016 at 10:02 pm #255688Hi Kor,
They are made with checkbox custom fields.
Removing the borders and just spacing them further apart works too though as I guess I don’t really need them.
Thank you for that!August 30, 2016 at 6:37 am #255829Hi Carol,
Do you think you can share WP temp admin access to your site so we can take a better look? I’d like to see if there’s a way to remove the texts beside the icon. You can post the details here using the private reply option below.
Thanks!
August 30, 2016 at 4:31 pm #256161This reply has been marked as private.August 31, 2016 at 4:46 am #256579Hi Carol,
Thanks for sharing the credentials. I’ve just checked with our developer and he mentioned that it isn’t currently possible to remove the “Yes” from the checkbox. However, they mentioned that they have included a function that would allow us to remove the “Yes” text from the checkbox using filters, but that would only be available in the future release. Well, let us know if you need anything else.
Thanks!
September 2, 2016 at 11:27 am #258212Hi Carol,
Could you please update the GD plugin to the latest version then apply the code below into your theme functions.php file? It should now remove the “Yes” from the checkbox. Let us know if it works for you.
function my_geodir_cf_checkbox($html,$location,$cf,$p=''){ $html = str_replace(array(": ","Yes"),"",$html); return $html; } add_filter('geodir_custom_field_output_checkbox','my_geodir_cf_checkbox',15,3);
Thanks!
September 3, 2016 at 5:52 pm #259104Hi Kor,
I tried it but it took down my site.
September 5, 2016 at 2:42 pm #260190Hi Carol,
please provide a link, admin and FTP credentials and we will check what’s wrong.
The function should be correct.
Let us know,
Thanks
September 5, 2016 at 5:10 pm #260379This reply has been marked as private.September 5, 2016 at 5:17 pm #260402Hi,
of course it doesn’t work, this is what you pasted:
function my_geodir_cf_checkbox($html,$location,$cf,$p=#039;'){ $html = str_replace(array(": ","Yes"),"",$html); return $html; } add_filter('geodir_custom_field_output_checkbox','my_geodir_cf_checkbox',15,3);
this is what you are supposed to be pasting:
function my_geodir_cf_checkbox($html,$location,$cf,$p=''){ $html = str_replace(array(": ","Yes"),"",$html); return $html; } add_filter('geodir_custom_field_output_checkbox','my_geodir_cf_checkbox',15,3);
You can’t use HTML special characters in PHP. You need to use
'
for single quotes and
"
for double quotes.
Let us know if this helped.
Thanks
September 5, 2016 at 6:02 pm #260448Thanks for that, Unfortunately I still have problems when I paste that in as well…
September 5, 2016 at 6:34 pm #260457Sorry about that, I copy and pasted the code without the “function my_” part.
The correct code is:
function my_geodir_cf_checkbox($html,$location,$cf,$p=''){ $html = str_replace(array(": ","Yes"),"",$html); return $html; } add_filter('geodir_custom_field_output_checkbox','my_geodir_cf_checkbox',15,3);
Thanks
September 5, 2016 at 6:53 pm #260465Hi Paolo,
I tried that as well, it still doesn’t seem to work.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket