Customising the Results with WPML

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)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.