Remove colon from labels

This topic contains 6 replies, has 4 voices, and was last updated by  Alex Rollin 5 years, 7 months ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #446315

    Antonella Gallino
    Buyer
    Post count: 73

    Hi there,

    how can I remove the colon at the end of the custom field label?

    Thanks a lot,

    Simone

    #446366

    Patrik
    Moderator
    Post count: 1971

    Hi,

    Can you please provide admin details in private reply to look more into this?

    Regards,
    Patrik

    #446417

    Alex Rollin
    Moderator
    Post count: 27815

    For the developers

    This is a custom field with a colon after the field label on the display side.

    She would like to know if there is a CSS solution to remove only the colon from one or more fields.

    An example is on this page: https://wpgeo.directory/supreme-directory/places/united-states/new-york/new-york/restaurants/gusto/

    Where there is a phone or other fields followed by a colon “:”

    Also see SS attached

    #446421

    Patrik
    Moderator
    Post count: 1971
    This reply has been marked as private.
    #446475

    Kiran
    Moderator
    Post count: 7069

    Hello Antonella,

    You can remove colon from field label by using following code snippet.

    
    
    function _gd_snippet_filed_label_remove_colon( $html, $field_location, $type ) {
    	if ( ! empty( $html ) ) {
    		$html = str_replace( ': </span>', ' </span>', $html );
    	}
    	return $html;
    }
    add_filter( 'geodir_custom_field_output_select', '_gd_snippet_filed_label_remove_colon', 999, 3 ); // 'select' field type
    add_filter( 'geodir_custom_field_output_multiselect', '_gd_snippet_filed_label_remove_colon', 999, 3 ); // 'multiselect' field type
    add_filter( 'geodir_custom_field_output_textarea', '_gd_snippet_filed_label_remove_colon', 999, 3 ); // 'textarea' field type
    add_filter( 'geodir_custom_field_output_html', '_gd_snippet_filed_label_remove_colon', 999, 3 ); // 'html' field type

    Currently it removing colon from select, multiselect, textarea & html field types, you can add more for text, radio, checkbox, file, datepicker, address etc.

    Thanks,
    Kiran

    #446752

    Antonella Gallino
    Buyer
    Post count: 73

    Hi there,

    thanks a lot! That worked.

    #446761

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
Viewing 7 posts - 1 through 7 (of 7 total)

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

Open Support Ticket