Remove "YES" from search filters

This topic contains 4 replies, has 3 voices, and was last updated by  Fulvio Di Stefano 4 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #507630

    Fulvio Di Stefano
    Lifetime Member
    Post count: 134

    Hello, I added checkbox options as search filters, but unfortunately they show the word Yes after the box, can i remove it? this script Kiran offered doesn’t seem to work there. see screenshot to understand the issue.

    function gd_snippet_300519_remove_checkbox_yes( $html, $location, $cf, $p = '', $output = '' ) {
    	if ( $html != '' ) {
    		$html = str_replace( ': </span></span>Yes</div>', '</span></span></div>', $html );
    		$html = str_replace( '</span>Yes</div>', '</span></div>', $html );
    	}
    
    	return $html;
    }
    add_filter( 'geodir_custom_field_output_checkbox', 'gd_snippet_300519_remove_checkbox_yes', 11, 5 );
    #507657

    Kor
    Moderator
    Post count: 16516

    Hi Fulvio Di Stefano,

    Thanks for your reply. I’ve just transferred this to Kiran. If possible, kindly provide WP and FTP access here in private reply.

    #507752

    Fulvio Di Stefano
    Lifetime Member
    Post count: 134
    This reply has been marked as private.
    #507827

    Kiran
    Moderator
    Post count: 7069

    Hi Fulvio,

    I have added following PHP snippet to hide Yes from checkbox search field.

    
    
    function gd_snippet_190912_search_filter_field_html_output_checkbox( $html, $field_info, $post_type ) {
    	if ( $html != '' ) {
    		$html = str_replace( '> ' . __( 'Yes', 'geodiradvancesearch' ) . '</li></ul>', '></li></ul>', $html );
    	}
    
    	return $html;
    }
    add_filter( 'geodir_search_filter_field_html_output_checkbox', 'gd_snippet_190912_search_filter_field_html_output_checkbox', 11, 3 );

    Kiran

    #507881

    Fulvio Di Stefano
    Lifetime Member
    Post count: 134

    Thank you kiran

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

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

Open Support Ticket