Empty search input returns all posts
Just an alternative to the informative answer by @PieterGoosen. After Pieter posted this part: if ( ! empty( $q[‘s’] ) ) { $search = $this->parse_search( $q ); } it came to mind that it might be possible to re-parse the search query, within the posts_search filter, for empty search string. But the parse_search() method is … Read more