Forums Forums Search & Filter Pro Display 'related posts' on the empty search results page

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #165569

    Hi guys.

    Could you assist with the following request, please?

    For instance, the user performs the search (which has an AND field relationship), but due to the requested data inside the searching bar – receives 0 results.
    How could we display on the ‘No results’ page the ‘related posts’ which match the filters he set for this search (e.g. beds, baths…)?

    Trevor
    #165593

    Are you using the Shortcode Display Results method, or a different one (if so, which one)?

    Anonymous
    #165784

    Hi Trevor.

    Yes, there is a Shortcode Display Results method being used.

    Trevor
    #165807

    Did you follow the Customising the Results documentation (so you have your own copy of the results.php file), and did you do any customisation to the file (as by default it has a ‘No Results Found’ message)?

    Anonymous
    #166381

    Yes, sir.
    I have a ‘results.php’ file inside the created ‘search-filter’ folder inside the child theme’s folder.

    And currently for ‘No Results’ there is just

    echo "No properties found matching your criteria. But you can also check these related properties:";

    Trevor
    #166420

    Then you need to add custom code instead of that text. You can access the query, as documented here:

    https://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/

    But how you would go on to use that and then code a related posts output, I do not know. You would need to hire a third party freelance coder for that.

    Anonymous
    #167131

    I see…
    Thank you, Trevor, for pointing this out.

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