Merge two search functions for custom post type

Your functions are already simple enough, and secondly, the functions do different things:

  • _s_staff_query() filters the posts query variables and the function has to run before WP_Query queries the database.

  • _s_staff_search() filters the search results template and the function has to run after WP_Query queries the database.

So just keep them independent.

error code: 523