Override default template of search results
- techniquepixParticipant2 years, 9 months ago #27335
In WPSOLR logs there are only the posts I want. No post from post types that I haven’t added to index. So I suppose the query must be modified after WPSOLR. I’ll check that, and I’ll let you know.
ThankstechniquepixParticipant2 years, 9 months ago #27339Hi,
I have installed the Query Monitor plugin to check the different queries. And it seems that WPSOLR query is done, and AFTER Elementor Pro does one another. Is the expected behaviour ?Thanks
techniquepixParticipant2 years, 9 months ago #27344Hi,
I do use the search archive template of Elementor. And I have the “archive posts” widget.
WPSOLR request is made, but it’s replaced by the one from Elementor Pro later. It’s as if Elementor made its own request and didn’t use the archive main query.
I tried without WPSOLR plugin. And it’s the same behaviour. I doesn’t have the same search results with Elementor archive template and without it. The posts displayed are not the same. As if Elementor is not using the main query.I think I’ll use the search template from my theme, and not the Elementor archive template. It will fix my issue.
Thanks
techniquepixParticipant2 years, 9 months ago #27347I don’t use facets. But it’s working fine with the search template from my theme. I have the expected results. So it’s ok.
Last question : it’s a multilingual site with WPML. Is it necessary to use the WPML addon of WPSOLR ? I didn’t activate it and I have only one index (FR by default), and the results in the other languages (like EN) seem to be correct. Is it ok or should I create an index for each language ?Thank you
wpsolrKeymaster2 years, 9 months ago #27348Indeed, you can decide not to activate WPML, and index all your posts in the same index.
But with the WPML add-on, you will be able to create one index per language, with specific language analysers (just a selection for Elasticsearch and Algolia, but requires manual specific settings for Solr in Solr admin and Solr server files).
But also, with the WPML add-on, all texts related to search can be translated with the WPML string module: all texts in the search template, all facets names and even contents. If you have a product colour attribute, “red” facet will appear on “en” search page whilst “rouge” will on “fr” search page.
WPML add-on Documentation: https://www.wpsolr.com/documentation/configuration-step-by-step-schematic/activate-extensions/wpml-add-on/
techniquepixParticipant2 years, 9 months ago #27350Hi,
Thank you for this clarification.Best regards
You must be logged in to reply to this topic.