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 Ticket

Tagged: 

  • Author
    Posts
  • #255466

    Carol Chu
    Expired Member
    Post count: 22

    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/

    #255557

    Kor
    Moderator
    Post count: 16516

    Hi 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!

    #255644

    Kor
    Moderator
    Post count: 16516

    Hi 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!

    #255688

    Carol Chu
    Expired Member
    Post count: 22

    Hi 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!

    #255829

    Kor
    Moderator
    Post count: 16516

    Hi 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!

    #256161

    Carol Chu
    Expired Member
    Post count: 22
    This reply has been marked as private.
    #256579

    Kor
    Moderator
    Post count: 16516

    Hi 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!

    #258212

    Kor
    Moderator
    Post count: 16516

    Hi 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!

    #259104

    Carol Chu
    Expired Member
    Post count: 22

    Hi Kor,

    I tried it but it took down my site.

    #260190

    Paolo
    Site Admin
    Post count: 31206

    Hi 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

    #260379

    Carol Chu
    Expired Member
    Post count: 22
    This reply has been marked as private.
    #260402

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    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

    #260448

    Carol Chu
    Expired Member
    Post count: 22

    Thanks for that, Unfortunately I still have problems when I paste that in as well…

    #260457

    Paolo
    Site Admin
    Post count: 31206

    Sorry 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

    #260465

    Carol Chu
    Expired Member
    Post count: 22

    Hi Paolo,

    I tried that as well, it still doesn’t seem to work.

Viewing 15 posts - 1 through 15 (of 18 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