Remove colon from Business Hours

This topic contains 2 replies, has 2 voices, and was last updated by  Hui Ling Tan 4 years, 8 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #507610

    Hui Ling Tan
    Expired Member
    Post count: 349

    Hi,

    I saw a code snippet from Kiran with regards to removing colons from custom fields as shown below.

    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 

    But how do I do the same for business hours? I’m not sure what field type it is as it is a pre-set that comes along with the GD plugin.

    Thanks a lot!

    #507619

    Kiran
    Moderator
    Post count: 7069

    Add one more following filter.

    add_filter( 'geodir_custom_field_output_business_hours', '_gd_snippet_filed_label_remove_colon', 999, 3 ); // 'business_hours' field type

    Kiran

    #507672

    Hui Ling Tan
    Expired Member
    Post count: 349

    Thank you so much Kiran!!!

Viewing 3 posts - 1 through 3 (of 3 total)

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

Open Support Ticket