Limit search field to just search a custom post type with custom fields
post_title isn’t a valid argument to WP_Query. If you dump the SQL you will see that it is ignored: string(189) “SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type=”investigator” AND (wp_posts.post_status=”publish”) ORDER BY wp_posts.post_title ASC LIMIT 0, 6″ You can use name (or pagename) instead, but you cannot push raw SQL through like that. It … Read more