Custom post type search using $_SESSION and pre_get_posts
On your search form you use NULL (as a string) for Any selection. When the form is submitted it is sent as a string with the contents of the word null. Your isset then sees that, its set and sets the session to null (as a string). Which in turn messes up your query. To … Read more