Wordpress admin search not returning results for custom post type with custom fields -
so defined custom post type of type 'clients' custom fields follows:
// clients register_post_type( 'isa_client', array( 'labels' => array( 'name' => __( 'clients' ), 'singular_name' => __( 'client' ) ), 'public' => true, 'has_archive' => true, 'hierarchical' => false, 'show_ui' => true, 'show_in_menu' => 'mnuisappointments', 'rewrite' => true, 'supports' => array('thumbnail') ) );
and specified columns show on admin clients page follows:
add_filter("manage_edit-isa_client_columns", "isa_client_edit_columns"); function isa_client_custom_columns($column){ global $post; switch ($column) { case "isa_client_salutation": $custom = get_post_custom(); echo "<b><a href=" . get_edit_post_link($post->id) . ">" . $custom["isa_client_salutation"][0] . " " . $custom["isa_client_name"][0] . " " . $custom["isa_client_surname"][0] . "</a></b>"; break; case "isa_client_phone": $custom = get_post_custom(); echo $custom["isa_client_phone"][0]; break; case "isa_client_email": $custom = get_post_custom(); echo $custom["isa_client_email"][0]; break; case "isa_client_address": $custom = get_post_custom(); echo $custom["isa_client_address"][0]; break; } }
however when trying search client using custom field value not getting results
Comments
Post a Comment