Forums › Forums › Search & Filter Pro › Display 'related posts' on the empty search results page
Tagged: related filters, related filters in search results, related posts, related posts in search results, search results
- This topic has 6 replies, 2 voices, and was last updated 6 years, 7 months ago by Anonymous.
-
Anonymous(Private) March 12, 2018 at 5:57 pm #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(Private) March 13, 2018 at 4:58 pm #165807Did 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(Private) March 16, 2018 at 11:15 am #166381Yes, 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(Private) March 16, 2018 at 1:39 pm #166420Then 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.
-
AuthorPosts