I think you need to check status in your search-news.php template. And if $_GET['status'] is equal to future, create custom loop for it. Your search-news.php could look something like this:
if ( $_GET['status'] == 'future' ) :
$the_query = new WP_Query( array(
'post_type' => 'news',
'post_status' => 'future',
// else arguments ...
) );
while ( $the_query->have_posts() ) : $the_query->the_post();
// do stuff ...
endwhile;
wp_reset_postdata();
else :
// do normal news stuff ...
endif;
Related Posts:
- How to create a custom search for custom post type?
- Extending the search context in the admin list post screen
- Creating a search form for custom fields
- How can I change the admin search posts fields?
- group search results by post type?
- Admin Area Custom Type Search By Meta Fields Without Title & Content
- Custom post type admin search
- Using standard search function with custom post type
- The right way to create a custom search page for complex custom post types
- Search everything (posts, pages, tags, cpt, meta)
- Search Custom Post Type with all meta attached?
- Include images from pages in wp search.php results in default wp search
- Backend search; include CPT meta?
- Custom Search | Wrong output & question
- Limit search form to 4 custom post types only
- Group search results by post type, but hide post types with no results
- Search results ordered by custom post types are not grouped
- Search Post Title Only [duplicate]
- How can I include meta box content when searching?
- Customize Search to only search current custom post type
- How to search from specific post type with tags?
- Include different loop templates in search query
- Search tags in CPTs
- How to search CPT’s by meta query from the admin dashboard?
- Set meta_query only for specific post type
- Custom Fields vs Separate Table
- Add custom post type archives to search results?
- CPT Meta Searching
- How to filter search results by post type?
- How to create an advanced filter search?
- Custom search results page query, link permalink to post title while separating by post types
- Custom Search for Drafts in Custom Post Type
- Including Custom Meta with posts_where query
- search also in taxonomy, tags and custom fields
- Custom post type search using $_SESSION and pre_get_posts
- Custom Post Type And “fopen”
- Filter custom posts using auto populated dropdown selectors
- Make parts of your wordpress website completely built with data from external APIs?
- Including metaboxes from custom post types in global search — continued
- Custom post type not showing in search result
- Searching Custom Post Types
- How do i search authors from search form using author’s name
- BBPress Search results in WordPress search
- Limit Search to Post Type With Apostrophe return search not found
- Search filter triggered & sort by custom post type
- Set Custom Post Type in Widget Settings for use in Widget
- Displaying and searching Custom Posts
- Searching Custom Fields
- Can NOT search my custom post type?
- Custom post_type search pages
- Pagination Error : Duplicate argument being outputted
- WordPress search and date filter not working with custom post type
- Custom Empty Results page for my Custom Post Type
- Custom filter for main search: how to exclude specific post_type from search results
- Display an icon based on post type
- how to get this tax_query working?
- How to group search results by post type and only if post type result is not empty?
- find custom post type post by searching its custom field with my string
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- What is the correct term for a tool that filters content based on metadata?
- Ideas on how to organize a project [closed]
- Filtering custom posts by custom fields (ACF) [closed]
- CPT, meta-data, url parameter
- Search CPT Title AND Meta
- Building a Data Intensive Website with WordPress
- Modifying search results based on post_type
- WordPress CPT Taxonomy Dashboard Search – How to include taxonomy in search?
- Is it possible to get the specific content on the search page?
- Search for custom field input of a custom post type in ajax live search
- Search only one custom post type
- Query first and last name from custom post type
- Custom search for a custom post type in WordPress
- Advanced search form with multiple custom fields
- Search in multiple specific post types
- I can not display search template created from a post type custom
- Creating a search results page from a custom post type in a plugin?
- Search custom post type result in same template page
- Include images from pages in wp search.php results in default wp search
- Search facility with directories
- Create Second Search Page Only for Custom Post Type
- custom search form for custom post
- Custom post url in search.php isn’t the correct rewrited url
- custom search results – order results differently by post type
- Conditional posts in WP_query for search
- Post search not looking at post title since 4.4.2 upgrade
- Manually build WP_Query
- Trying to modify custom search function in plugin to search postmeta table for keyword as well as posts table
- pre_get_posts not firing at all
- Custom Search not working
- Is it good practice to search for custom posts based on custom field values?
- Diffrent search templates for different post types
- Cannot get query var ‘post_type’ to work
- Problem with custom post type search
- admin search of pages returns custom post types
- Why does ‘exclude_from_search’ exclude a custom post type from WP_Query?
- Custom post archive with search, is_search() is false?
- Why custom search engine only searches in post titles of custom posts?
- How do I provide a search form for a specific post type, that is capable of searching within custom fields of the specified CPT?
- Meta_query question
- Search for portfolio tags & mixing portfoliotags and post tags