Objective:
In our WordPress site, using Toolset to build an archive for search results, we aim to achieve the following:
1. Display Custom Post Type Only
- In the search results archive, only items of the custom post type "produkte" should be displayed (excluding posts, pages, etc.).
- Issue: In the "Query Filters" section, there is no apparent option to filter by "post_type" or similar. How can we add this filter?
2. Comprehensive Search Functionality
- Enable the standard WordPress search field to search across all fields, including custom fields associated with "produkte," without requiring a custom search form.
3. Admin Area Search
- In the WordPress admin area, searching for "produkte" should also include results from custom fields.
Site Link: hidden link
Thank you in advance for your assistance and ideally for a direct solution!
Best regards,
Matthias
Hello. Thank you for contacting the Toolset support.
As per our support policy, we entertain only one question per ticket. This will help us to write problem resolution summery for the original issue reported as well as help users searching on the forum.
For now, I will focus on the 1st question and will address the other issues later on once the 1st issue is addressed.
To control the post types for the search result archive, for that, you will have to create the search result archive using the legacy view.
Once you enable the legacy views, you should try to create the Search Result archive using the legacy view and from the "Loops Selection" section select the "Search results" and as soon as you select the option "Search results" you will see "Edit" button just below that using which you will be able to control the post types you want to include.
I wanted to switch the editor to the legacy version, but I received a message indicating that all content would be deleted. Unfortunately, that isn’t an option for us, as we’ve put considerable time into designing the search page with multiple conditions and customizations.
Is there a way to hook into or override the Toolset/WordPress function handling the query?