Forums Forums Search & Filter Pro Customising the Results with WPML

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #78262

    Hi,

    I have 2 kind of searchs:
    – Videos
    – Whitepapers

    For 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 🙂

    Trevor
    #78304

    As soon as you need more than one template, the you need one for every form. This might be something to consider for the future, if you want me to make it a feature request.

    Ross Moderator
    #78409

    Hi 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

Viewing 3 posts - 1 through 3 (of 3 total)