I have a page template where I call in a custom post type like so:

 $caseArgs = array(
  'post_type' => 'cases',
  'post_status' => 'publish',
  'posts_per_page' => -1,
  'order'    => 'DESC'

I then loop through the code on the page and echo out the results.

Would it be possible to have a search box on the same page where, if the user enters a keyword, then it triggers the $caseArgs to also include a category in the arguments, and then refreshes the content echod out below when finished?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.