i have put new input form field in search-author.php. This field will get the zip code from user. I have created a function in functions.php
//function for searching by zip used in simple user listing plugin
function get_users_by_meta_data_zip( $meta_value ) {
// Query for users based on the meta data
$user_query = new WP_User_Query(
array(
'meta_key' => '_zip',
'meta_value' => $meta_value
)
);
$users_by_zip = $user_query->get_results();
return $users_by_zip;
} // end get_users_by_meta_data
this function returns $users_by_zip which i use in simple-user-listing.php to generate list on the basis of zip code. Everything is working fine. The code is now fetching the users having that zip code in their meta field. But the problem is, whenever i search by putting in some zip code, it shows the result without displaying footer and sidebar of my theme. Can please help me out on this?
Thanks,