• WPML compatibility is available with this plugin, with a small change in code of search_form.php

    Around line 50 you should replace the default
    “$results_page = apply_filters(“wpcfs_results_page”,get_site_url(),$data);”
    string with a wpml language condition and a little change in the code.

    A working example is as below:

    <?php if(ICL_LANGUAGE_CODE==’en’): ?><?
    $results_page = apply_filters(“wpcfs_results_page”,get_home_url(),$data);?>
    <?php elseif(ICL_LANGUAGE_CODE==’el’): ?><?
    $results_page = apply_filters(“wpcfs_results_page”,get_site_url(),$data);?>
    <?php endif; ?><?

    Notice, that for the secondary language of the site (in our example is en) you should change to “get_home_url” instead of “get_site_url”, as WPML cannot translate the “get_site_url” automatically.

  • The topic ‘WPML Compatibility Available’ is closed to new replies.