Forums › Forums › Search & Filter Pro › Multiple Search Forms — WPML
Tagged: ID, multiple search forms, results, WPML
- This topic has 9 replies, 3 voices, and was last updated 4 years, 3 months ago by Ross.
-
Anonymous(Private) June 22, 2020 at 11:52 am #249621
I use Multiple Search Forms on my website.
To edit the output of the results, your documentation says that I need to change result.php to the ‘id’ of the search form, e.g. 484.php.
My website is in 4 languages. I use WPML for the translations. Each language gets a different id from search & filter, even if it is the same search function. How can I put the results of these 4 id’s together in one php file? Without having to create 4 different files.Trevor(Private) June 22, 2020 at 1:01 pm #249627If you wish to avoid coding and recoding the potentially four different files, you would still need to make the four ‘numbered’ PHP template files, but, where you would have the PHP to output the results, instead use a PHP ‘include’ to include a common PHP layout file. For example, that file could be:
.../wp-content/themes/themename/search-filter/includes/my-real-layout.php
Anonymous(Private) June 25, 2020 at 8:53 am #250010Thanks for the idea!
When I make a translation of the filter. I filter on a custom Taxonomy where the slug is translated with WPML. Search & filter still uses the not translated slug of the taxonomy.
How can I change it that it uses the translated slug of the custom taxonomy.Example:
https://namesite.be/en/research?_sft_onderzoek_categorie=publication
has to be:
https://namesite.be/en/research?_sft_research_category=publicationTrevor(Private) June 25, 2020 at 2:14 pm #250103Are you following this guidance:
https://www.screencast.com/t/ilRNslX4ZI4P
Because, when I look at those URLs, both have
/en
in them.Anonymous(Private) July 8, 2020 at 12:19 pm #251996Sorry, I wasn’t talking about the /en/, but about ‘_sft_onderzoek_categorie’.
‘_sft_onderzoek_categorie’ has to be ‘_sft_research_category’. It didn’t translate it, while I translate the slugin in the CMS system.so dutch is = https://namesite.be/nl/research?_sft_onderzoek_categorie=publication
and english has to be = https://namesite.be/en/research?_sft_research_category=publication
but is now = https://namesite.be/en/research?_sft_onderzoek_categorie=publication ==> WRONGThe URL’S are fictive, so it doesn’t work.
I hope it’s now clear? -
AuthorPosts