Hello Sam,
Try following snippet to prevent custom field html wrap by p tags.
function _gd_snippet_output_html_field( $html, $location, $cf ) {
global $post;
$html_var = $cf['htmlvar_name'];
if ( !empty( $post->post_type ) && ! empty( $post->{$html_var} ) ) {
$field_title = trim( $cf['site_title'] ) != '' ? __( $cf['site_title'], 'geodirectory' ) . ': ' : '';
$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'] . ' ' . $html_var . '" style="clear:both;"><span class="geodir-i-text" style="' . $field_icon . '">' . $field_icon_af;
$html .= $field_title;
$html .= '</span>' . $post->{$cf['htmlvar_name']} . '</div>';
}
return $html;
}
add_filter( 'geodir_custom_field_output_html_var_geodir_html_field', '_gd_snippet_output_html_field', 11, 3 );
Kiran