Can’t place two custom post types into the WordPress search query?

Try to drop that in your functions.php file: function filter_query_for_search( $query ) { if ( isset( $query[‘s’] ) ) { $query[‘post_type’] = array(‘forum’, ‘topic’, ‘reply’, ‘any’); } return $query; } add_filter(‘request’, ‘filter_query_for_search’, 1); that would hook into the query just before its being executed.