The magnifying glass search is a standard WordPress search provided by your theme.
It displays the standard post results, linking to the individual post URLs.
To modify that you would need to edit the theme template used for the search results (there will probably be a search.php file). You would need to include some custom code in that to generate the links in the format you require.
Alternatively you could make a search View, including text search, with the results in your required format. You would need to insert that on a page, and then make some changes to your theme so that the magnifying glass linked to that search page instead of invoking the standard search as it does now.
ok. I use the Astra Theme. In the main Theme (not the Child-Theme) there is the "search.php"-file. I don't know if I would change something there, if this would break away when a theme-update happens.
Which of the both solution is the better/easier one? If I understood you correctly, there is custom code needed for both solutions. Which custom code do I need for either one of the solutions?
The site was built with Elementor and the the search widget (magnifying glass) is an Elementor widget.
I do also have the Relevanssi plugin, but I think this doesn't matter, right?
If you wanted to modify the search.php template you would copy it from the parent theme to the child theme and make your modifications there, then they wouldn't be lost by an update of the main theme.
But if your search comes from an Elementor widget, I would say the solution is fairly easy, you replace that with a simple html widget to display a link to a search page where you set up a search View that outputs the links in the required format.
Ok, the second solution seems to be good. So you mean (please see attached screenshot) that I replace the Post Archive Widget in the Search Results Elementor Template with an HTML-widget that points to a view which outputs the search results?
I just trying another solution, but I don't know if it works. As you know, Elementor know supports Toolset. I created a Single Template with Elementor and set the CPT "Veranstaltung buchen" as Content Type and set the Conditions in Elementor Template as "Veranstaltung buchen". Now I thought that if you click on one of the events from the events Overview ( hidden link) that it would point to the created Single Template, but it doesn't. Do I have to modify also the view with the link?:
I'm not sure I quite follow what you are doing with the Elementor templates, sorry.
But on your first point, no I did not mean you make any changes to the Element Search Results Template.
I meant that you stop using the Elementor search widgets (and the resulting search archive) because it will display the standard links to the custom posts, and not in the format you require with the event_id URL parameter.
You should *remove* whatever is responsible for the magnifying glass (I have understood this to be an Elementor search widget).
Instead you should place a link to a new search page (by all means use a magnifying glass for the link icon, but understand that clicking it will take you to the new search page, it won't open up a search dialog as it currently does).
Then on that new search page you insert a search View which you create, and which includes a text search input, and which outputs the results as links in the format you require (with the event_id URL parameter).
Hi Nigel,
thanks for the explanation. I got another solution, that works partly right now. If you use the default search as it is right now and you search for "Testveranstaltung", he displays my Elementor Template, which I created with the dynamic fields from my Events-CPT. These are two videos, which describe what I'am trying to do/what I have done: hidden link hidden link
Now for the overview of my events (hidden link) he still points to the Page "Veranstaltungsdetails", which I used in Elementor and inserted a Toolset-Content Template. For this you helped me a view weeks ago with the view (hidden link) and helped me with the link to point to that page:
.
Now he refers/points to the corresponding event in the event-view ((hidden link) as well as using the default WordPress search. 🙂
Anyway, thanks for your help. 🙂