You should create pre_get_posts
filter and trigger in the $query->is_search()
to check if post_type
is set to author
and if it is then unset post_type
to posts or what evver you want and set author parametrs to $query
object.
related links:
https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts
https://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters
Or you should create another select, listing all users and give it a name of Author Parametrs
found in wp_query
Related Posts:
- How to create a custom search for custom post type?
- Search multiple custom fields by using meta_query
- Search results ordered by custom post types are not grouped
- How to create an advanced filter search?
- Custom search for custom post meta with pre_get_posts interferes with WP search
- WordPress sort search results by custom order
- How to have multiple search result pages in wordpress with taxonomy terms listed
- Search for custom field input of a custom post type in ajax live search
- Advanced search form with filters for custom taxonomies and custom fields
- Restrict custom post type to only site administrator role
- Prevent pre_get_posts filter on specific post type
- How to force one column layout on custom post type edit page?
- Have different search results template depending of custom post type searched
- How does one delete orphan custom post type?
- Redirect after deleting post and keep track of pagination
- Custom Post Type with Custom Title
- Include images from pages in wp search.php results in default wp search
- Separating Search Results By Post Type
- WordPress Admin Panel search posts with custom post meta values along with title
- Custom Search form not working in localhost
- remove_action conditionally for Custom Post Type
- How can I customize “Pages” admin (edit.php) and “Edit Page” admin (post.php) for bulk edit of custom content type?
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- Is there An Input Checkbox Option That Works like `wp_dropdown_categories()` To Use In A WP Search Form?
- Custom Post Type by user
- Include different loop templates in search query
- How do I add a custom button to my “edit” list? ( edit.php?post_type= ) beside “Add New”
- Best practice for adding posts in bulk
- How to get Custom Post ID by adding filter to child theme’s function
- CPT Search Form with Taxonomy filter & Or
- Remove All, Published and Trashed Post Views in Custom Post Type
- WordPress if in term*
- Weird problem happening with custom taxonmy when creating/updating posts
- How to structure a site with product variations pages?
- CPT: if more than X images are in post, use pagination
- Conditional Query of Custom Post Type and custom taxonomy
- How do I move/order posts with a tag to the end?
- Structure of data : CPT + terms
- Default text in a specific post type, but not visible?
- WP_Query custom post type query not showing the exact post type
- Include custom post type content in search
- Get post count for search result based on post type
- How to remove post listing page for a custom post type
- How to include term custom meta into the custom taxonomy term permalink structure
- search suggest – filter post type
- Search filter triggered & sort by custom post type
- Searching Custom Fields
- Can NOT search my custom post type?
- How do you make a custom post type items automatically delete items 3 months after publication?
- Custom post_type search pages
- Custom Empty Results page for my Custom Post Type
- How to display custom field value on page?
- Add an Outside Wrapper to my Header and Make it Full Width
- WordPress custom API endpoint – how to make the request more flexible
- Category Search / Custom Post Type search on my website. Custom Post Types that are “page-like”?
- Create custom WP_List_Table in post_type
- Filtering custom posts by custom fields (ACF) [closed]
- CMB select with data from CPT
- Search CPT Title AND Meta
- cannot achieve this structure (custom posts VS categories VS ??)
- Building a Data Intensive Website with WordPress
- Modifying search results based on post_type
- Home page is getting current-menu-item even if it’s not home
- Problem with customize page cached in WordPress.com [closed]
- Multiple categories assigned to a single product breaking the breadcrumb
- Adding a location field to buddypress activity
- How can I assign multiple parents to CPT?
- Search only one custom post type
- Query first and last name from custom post type
- Getting 404 on child page with pre_get_posts() on custom posts
- Limit posts per page depending on the size of a div?
- Delete Post by User
- save_post affect creation and deletion
- 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 results – order results differently by post type
- Set a static page as a user profile page?
- Problem to get the link of the default ‘post’ post type like the orther custom types
- How to display all custom fields associated with a post type – IN THE ADMIN AREA?
- How to keep a CPT stick to specific position?
- Post search not looking at post title since 4.4.2 upgrade
- Static front page has page url not site url
- WP_Query for CPT with filter by another WP_Query
- Custom Search not working
- Is it good practice to search for custom posts based on custom field values?
- Cannot get query var ‘post_type’ to work
- Problems with a custom meta_box
- How to apply order on custom taxonomy and custom meta key on custom post type
- How can i display on front page a movie that is atached in a post type
- Why does ‘exclude_from_search’ exclude a custom post type from WP_Query?
- Custom post type functions.php if statement on action
- How to make a template for a specific post of a custom post type?
- Bulk update custom post types
- Slideshow/Gallery plugin based on WP Core Gallery [closed]
- ACF select box css color change
- Creating post custom field text area
- Delete old thumbnail when updating new
- How to automate the creation of advanced layout article/post