0

I'm able to limit the search to one post type which works like a charm.

This code works: <input type="hidden" name="post_type" value="videos"/>

However, how do I limit the search to be performed in 4 custom post types instead of just one.

The post types are "videos, e-courses, e-books and white-papers".

Any help is really appreciated.

Thanks

1

You have to change the input with 4 inputs like this :

<input type="hidden" name="post_type[]" value="videos" />
<input type="hidden" name="post_type[]" value="e-courses" />
<input type="hidden" name="post_type[]" value="e-books" />
<input type="hidden" name="post_type[]" value="white-papers" />

You may get more detail about a complete code in this article

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.