Hi @palemo,
Do you need find users using search using front-end search? My plugin works when you search post, pages and custom post types.
I also need to be able to extend searching to ACF fields on User pages.
I only need to search within the backend at present (Users list).
Really hope this happens.
Hi @parakeet,
Please give me your code and screenshots.
Which code and screenshots?
Hi
I also tried to call the user name, using field type ‘User’
It displayed the User Name on eash post by using
<?php
$values = get_field(‘ztest’);
if($values){
$array = array_values($values);
echo $array[5];
}
?>
but when I search on WordPress Search input box, it gives search result with other ACF values but did not give search result from ACF field type ‘User’ value.
The author name could be displayed by using only below code
<?php the_author_meta( ‘display_name’ ); ?>
but no search result from both of this.
Please could you help me on this.
Thanks
for search I am using this function
This is working fine on searching post with post title, post content and from ACF fields on post. but not from author.
add_action( ‘wp_ajax_search_cposttype’, ‘searchCposttypeByTerm’ );
add_action( ‘wp_ajax_nopriv_search_cposttype’, ‘searchCposttypeByTerm’ );
function searchCposttypeByTerm() {
//$authors=get_users();
$wp_query = new WP_Query(array(
‘post_type’=>’cposttype’,
‘post_status’=>’publish’,
‘s’ => $_GET[‘searchTerm’]));
while ($wp_query->have_posts()) : $wp_query->the_post();
get_template_part(‘template-parts/cposttype/cposttype-post’);
endwhile;
wp_die();
}
Hi @rajanshrestha,
The plugin takes into account the title, content field and fields from the ACF plugin.
How can I help you?