Hi Emily,
Add following code snippet in your theme functions.php file or add via any snippet plugin.
Following code will remove “Yes” text for checkbox fields.
function _gd_custom_hide_checkbox_yes( $html, $location, $cf ) {
global $post;
if ( ! is_array( $cf ) && $cf != '' ) {
$cf = geodir_get_field_infoby( 'htmlvar_name', $cf, $post->post_type );
}
if ( empty( $cf ) ) {
return NULL;
}
$html_var = $cf['htmlvar_name'];
if ( ! empty( $post ) && (int) $post->{$html_var} == 1 ) {
$field_icon = geodir_field_icon_proccess( $cf );
if ( strpos( $field_icon, 'http' ) !== false ) {
$field_icon_af = '';
} elseif ( $field_icon == '' ) {
$field_icon_af = '';
} else {
$field_icon_af = $field_icon;
$field_icon = '';
}
$html = '<div class="geodir_more_info ' . $cf['css_class'] . ' ' . $cf['htmlvar_name'] . '" style="clear:both;"><span class="geodir-i-checkbox" style="' . $field_icon . '">' . $field_icon_af;
$html .= ( trim( $cf['site_title'] ) ) ? __( $cf['site_title'], 'geodirectory' ) : '';
$html .= '</span></div>';
}
return $html;
}
add_filter( 'geodir_custom_field_output_checkbox_key_checkbox', '_gd_custom_hide_checkbox_yes', 10, 3 );
Thanks,
Kiran