What kind of control do you want exactly? There are, for example, plugins that provide a UI through which you can order posts by various parameters.
If you just want to order them all by one parameter that will not change, you can simply add it to your query (since you can order by multiple conditions):
if ($query->is_search) {
return $wpdb->posts . '.post_type DESC, title DESC';
}
Edit: here’s another question you might find useful.
Related Posts:
- I did group my search results by post type, but how can i give each of them its own order?
- How to create a custom search for custom post type?
- Extending the search context in the admin list post screen
- Include custom taxonomy term in search
- Adding ‘menu order’ column to custom post type admin screen
- Advanced search form with filters for custom taxonomies and custom fields
- Custom post type – order field
- Creating a search form for custom fields
- Searching multiple custom post types and pages
- AJAX search on post pages by custom post type
- How can I change the admin search posts fields?
- How to make a WP_Query search with custom post types?
- group search results by post type?
- Displaying a custom post type alphabetically
- Development of a WordPress Search Plugin – Best Practices
- Order by & include array by specific post ids
- Admin Area Custom Type Search By Meta Fields Without Title & Content
- Simple way to search custom-post types only
- Pushing a custom post type to the top of the search results
- Search multiple custom fields by using meta_query
- How do I Paginate Search Results for Custom Post Types?
- Sort Order for a Custom Query in a Post Type Archive Not Working
- Select All in Parent Category, Group by Child Category?
- Custom post type admin search
- WordPress post sorting with AJAX
- Why have my custom post type searches stopped working after changing URLs / updating WordPress?
- Using standard search function with custom post type
- Search that will look in custom field, post title and post content
- Have different search results template depending of custom post type searched
- Ordering posts having multiple post-meta date fields
- Returning search results by relevance, including Custom Post Types
- How to replicate some of Drupal Views functionality in WordPress?
- The right way to create a custom search page for complex custom post types
- Seperating Custom Post Search Results
- Exclude from search all custom posts which are NOT in a taxonomy term
- Exclude a term of a taxonomy with a custom post type in a search
- Order Posts by Taxonomy and Meta Value
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Custom Post type sort order not working in the admin area
- Search everything (posts, pages, tags, cpt, meta)
- Search Custom Post Type with all meta attached?
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- filter search result with custom post type meta key
- Order posts by (hierarchical custom) taxonomy terms and term children
- Custom search for custom post type, custom meta and search fields
- Compare 3 custom fields and sort by oldest
- List upcoming events, ordered by date in a custom field
- Include images from pages in wp search.php results in default wp search
- Separating Search Results By Post Type
- How Do I Use WP_Query to Run This Database Query as Search Result?
- Custom Post Types: pretty search URLs and has_archive
- WordPress Admin Panel search posts with custom post meta values along with title
- Backend search; include CPT meta?
- Custom Search form not working in localhost
- 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
- Is there An Input Checkbox Option That Works like `wp_dropdown_categories()` To Use In A WP Search Form?
- Search Post Title Only [duplicate]
- ascending order custom post type
- WP_Query post at custom position
- Sort custom post types by last name in the backend
- How can I include meta box content when searching?
- query order by date on custom type: wrong order
- Customize Search to only search current custom post type
- Taxonomy list. Order by a specific custom post type count
- How to search from specific post type with tags?
- No results searching custom post type in admin panel
- Include different loop templates in search query
- WooCommerce – Show orders for a specific product ? [closed]
- custom search result page
- Re-order posts in query after
- Search tags in CPTs
- How to search CPT’s by meta query from the admin dashboard?
- Set meta_query only for specific post type
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Customize Search Results for Custom Post Type
- Display custom post types with custom date field value (before today) & order by custom date field
- multiple search forms and search results
- error in Advanced Search Form for Custom Post Types in WordPress array_key_exists() expects parameter 2to be array, string given
- Custom Post Type order by modified date and custom meta field issue
- Search Custom Post Type Custom Fields
- Custom Post Type not appearing in website search
- How to query different post types in specific order?
- Custom Fields vs Separate Table
- Add custom post type archives to search results?
- CPT Meta Searching
- CPT Search Form with Taxonomy filter & Or
- Keyword search limited to specific post type filtered by multiple custom taxonomies?
- How to filter search results by post type?
- How to create an advanced filter search?
- Custom search for custom post meta with pre_get_posts interferes with WP search
- How to search map address in custom post type?
- Custom search results page query, link permalink to post title while separating by post types
- Custom Search for Drafts in Custom Post Type
- How to quickly reorder posts in the admin panel that will persist for the wp-api
- How do I make a custom taxonomy for a CPT appear inbetween title and editor boxes?
- WooCommerce product search titles only
- Including Custom Meta with posts_where query