Forums Forums Search & Filter Pro How to not show results in first search + translate "Older/ newer posts"

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #67431

    Hi Trevor,
    Thanks for the great plugin and support. I have now 3 doubts:

    1. Can you please share how to show no results (0 retrieved results) before the first searching is done? I am using shortcode method and before filtering all possible results are shown.

    2. Also, could you please tell me how to translate “older posts” and “newer posts” in the search results? I tried via mo/po of the theme, but no luck. Also, no luck trying to translate Search and Filter plugin.

    3. Is it possible to display in one page a multiselect combo-boxes at the top of the page, and more fields + results bellow? It seems that this would be 2 different search forms, or is there any way of achieving this?

    I am sharing more details in a private answer. Thanks!

    Anonymous
    #67432
    This reply has been marked as private.
    Anonymous
    #67434
    This reply has been marked as private.
    Trevor
    #67509

    Hi

    For 1 and 2, you would need to edit the results.php file that you copied into your theme folder. 3 is not possible, yet. It is on our roadmap, but it may be a while yet, to allow form elements in different places on the page.

    So, for 1. This is the basic code:

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1726)->current_query();
    if (!$sf_current_query->is_filtered()) {
    // put anything you want instead of the results for the page loading without query parameter
    } else {
    // put the output part of the results.php here
    }

    Where 1726 is changed to whatever the ID number of your form is.

    For 2, simply find those text strings in the results.php file and replace.

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