Forums › Forums › Search & Filter Pro › Customising the Results with WPML
Tagged: custom results, WPML
- This topic has 2 replies, 3 voices, and was last updated 7 years, 10 months ago by Ross.
-
Anonymous(Private) December 22, 2016 at 3:16 pm #78262
Hi,
I have 2 kind of searchs:
– Videos
– WhitepapersFor each search, I have 4 languages. So in total I have 8 search shortcodes, and 8 differents ids (one per language, for both searchs).
I used WMPL instructions to make the translation, it worked perfectly.
My problem :
For all 4 videos search results, I want to use the same custom results.php, and same thing for Whitepapers. If I followed the instruction “Customising the Results”(here : https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/), I will have 8 php files, one for each form. It’s pity because I will have duplicated php files, the only difference will be the name of the php file ([id of search].php).Is there any way to use one custom result php file for multiple searchs ?
Thank you for your answer 🙂
Ross Moderator(Private) December 22, 2016 at 9:09 pm #78409Hi Julien
Trevor is correct, you will need multiple IDs for your results.
I am planning to allow results templates to simply be named according to their slug – which means you can have 1 filename for all..
For now, you could create a “1.php”, “2.php” etc, and have all of them `include ‘main-results.php’ so you only have to maintain the 1 file once you’ve setup the IDs.
BTW, we had some WPML compatibility issues (with their latest update) that I’ve just fixed, I emailed you a copy.
Thanks
-
AuthorPosts