The WP_User_Query uses the parameter search
rather than s
https://developer.wordpress.org/reference/classes/wp_user_query/#search-parameters
So try this instead
$args = array (
'role' => 'author',
'search' => esc_attr( $_POST['keyword'] ),
);
Related Posts:
- Getting all user metadata from user
- How to add custom query filters in WP_User_Query
- Searching user meta using WP_User_Query
- WP User Query get all authors with last name starting with specific letter
- WP_User_Query unable to retreive all user at once
- pagination with numbers for WP_User_Query
- Reduce number of SQL queries inside WP_Query loop to fetch author data
- array of meta values using WP_User_Query
- How to properly use AND / OR in custom search
- WP_User_Query and user posts
- construct complex queries with WP User Query
- WP_User_Query orderby meta_val_num
- Replace wp_query with wp_user_query
- Random users always showing same 8 users
- SQL to join u3g_users & u3g_meta_value with repeating data
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- WP_User_Query Orderby Not Working
- How to query 5 users in random who have published more than 10 posts
- WP_User_Query not searching numbers?
- Search Functionality broken by the wp 4.2 update
- Query Users by post count, last 30 days and display each users post count according to post type
- WordPress WP_User_Query ignores the `meta_query` when called from an Ajax function
- Posts with at least 3 tags of a list of tags
- Get post count of current loop when using multiple queries on one page
- How to uniquely identify queries?
- Use WP_Query with a custom SQL query
- Pagination not working for Custom search form & custom result template
- Looping through tabular data
- Using next/previous_posts_link with customised search
- How to display most recent posts that haven’t already been displayed with WP_Query?
- Display featured products through custom loop in WooCommerce 3 [closed]
- How to detect custom query inside `posts_where` hook?
- Is temporarily overwriting $wp_query a bad idea?
- Array Chunks and Inserting Varying HTML in WP_Query
- Filter user list that meta_value is empty
- Query wp_usermeta alongside wp_users
- How to output different posts per page?
- Multiple WP_Query loops with Pagination Not Working
- WooCommerce Only OnSale Products Loop Snippet [closed]
- Modifying the Search Results
- WP_Query times out
- ACF – Get lowest & highest value from field
- What format does the meta_query TIME type require?
- How to find a post id using the post_excerpt?
- wp_query add arguments using array_push if variable met
- tax_query: Order by slug?
- WP_Query date_query – Use unix timestamp?
- WP_Query filter and order by meta ordering by wrong joined table
- WP_Query last five posts, simply ordered by meta_value
- WP_Query “OR”: Find posts by ID, Name or Post Title?
- Querying A Post That Includes Two Taxonomies Using JSON Rest API
- WP_Query condition affects posts_per_page count
- Order by title without taking into account ‘the’
- How to figure out redirection and contents in hybrid solution containing word press content and legacy code (ASP.net)
- Category applied to pages, creates multiple breadcrumb entries after a search query (On the translated site)
- Most commented post showing 2 records
- How to store and receive variables in WP sessions?
- How to list posts with disabled/closed comments, with pagination?
- Category ‘pad_counts’ & ‘parent’ conflict
- How to exclude Sticky from Recent Post?
- Display if author page is author page of current user
- WP_Query order by not working properly due to category I believe
- get_query_var always returns the default value
- Modify WP_Query using pre_get_posts but only for frontend query?
- Multiple wp_query on archive page
- Function to retrieve IDs of posts, cache results, and improve wp_query
- parse_tax_query causing Navigation Menu To Disappear
- WP_query is not returning the expected result
- the_post_thumbnail do 2 queries. How to optimize
- wp query meta value is not null
- Search.php – return number of results but cannot loop through
- Creating ‘posts page’ loop based on the page itself
- How to get pages of parent (non-recursive)?
- WP_Query and pagination AGAIN?
- Can’t get term id for category archive
- Combine query in WP_User_Query()
- Nearby locations using Advanced custom fields, maps?
- How to display the category dropdown auto search list when key press?
- order by post date and modified date posts both in wpquery
- How to get_comments() ordered by date and parent?
- WPQuery loop not giving expected output
- WP Query filters active on wrong query
- Not able to fetch woocommerce variation sales products for particular category products
- Global page ID variable empty error
- Gather same custom field values in one value in a select tag with wp_query
- Order Posts By Youtube Views
- WP Query with sticky posts and tax_query
- Declare inline background image in functions.php
- WP_Query for attachments without duplicating post_parent and displaying tagged image
- Looking for a way to exclude frontpage and nav menu from query filter
- Query posts by custom fields
- Showing posts from 4 categories along with all latest posts
- Searching in specific custom post type
- WP Query Obj: Set value to be unequal | Hide media by admin
- WordPress pagination returns the same posts
- taxonomy-{term}.php terms pagination returning 404 after a certain page
- Using WP Query, I want to include all posts in category 1 as long as they are not also in category 2
- Prevent URL Parameter Affecting other WP Query
- Sort by multiple columns using get_posts
- WP_Query filter Posts by timestamp event (range start and end) and by month (next 12 month)