[Resuelto] Changing the default search archive using Toolset
This support ticket is created hace 4 años, 11 meses. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
No, I don't necessarily want to limit the number of items returned. What I"m trying to do is take the results from relevanssi and display them using the custom layout.
This is the functionality that I'm looking for: I have a site that shows the works of a composer. There are also recordings of these works and other material related to these works. I want a single search text box in the main menu that allows me to type in some search text and then to be shown the results grouped according to Custom Post Type, i.e. all the works first, then all the recordings, then the other material.
I'm using GeneratePress as my theme. GeneratePress offers the ability to have a search bar on the main menu that performs a standard WordPress text search. That was my screenshot in the first message.
I'm using Relevanssi to allow the WordPress search to be enhanced by searching through my custom fields.
The search functionality from point 1 above returns results from a number of different custom types (works, composers, recordings, etc) that are formatted really badly. I want to format these results to look better.
4) When I'm creating a custom search archive, I can't figure out how I pass the search criteria from the main menu search text box through to the View as a parameter so that I can filter accordingly.
"What I"m trying to do is take the results from relevanssi and display them using the custom layout."
From your screenshot i'm assuming that you've already created your custom search archive for the search results. If you have not yet done this you will need to go to Toolset > WordPress Archives and create a new archive and set it to the search results. This should allow you to customize how your search results are displayed.
"4) When I'm creating a custom search archive, I can't figure out how I pass the search criteria from the main menu search text box through to the View as a parameter so that I can filter accordingly."
Given that you are creating a custom wordpress archive for the search results archive page you won't need to add any search information to the custom archive you are creating. This is because once the search is done from your header it will link to your custom archive.
This will mean the results will be filtered and displayed in the format that you have defined in your custom archive. If this is not what is happening for you please let me know.
Also you can allow me to check what you've done so far to see if there is anything missing by providing me with admin access to the website.
The private fields have been enabled for your next response.
I've now created a custom WordPress Archive as you described in your previous message and it works.
I see now that I had created the Search Archive layout a different way. I didn't see the Toolset > WordPress Archives menu item, so I went Toolset -> Dashboard, chose a CPT archive that wasn't already created and created it. Then, in the new archive layout, I unassigned it from the CPT and assigned it to search (see attached). This method doesn't seem to work - it creates a Layout and not a View, like what happens when you create a custom WordPress Archive from Toolset -> WordPress Archives. This is really confusing though. What is the point of being able to assign a layout to the Search Results when it doesn't actually work?
I suspect the problem here could be that when you've assigned a Layout to the Search Results archive, you didn't add an archive cell to the layout.
The layout won't work without the archive cell. If this is what happened then you can try adding an archive cell to your layout so that it can display your results.