Forums › Forums › Search & Filter Pro › Empty search result
- This topic has 7 replies, 2 voices, and was last updated 10 years, 2 months ago by
Ross.
-
Ross Moderator(Private) April 9, 2015 at 12:14 pm #14755
Hey Nick
This is not an option within S&F, but you could modify you template to do something similar.
Basically you would have to edit hte template that is being used for displaying results, and add in custom logic/code that would detect these conditions.
Thanks
Ross Moderator(Private) April 9, 2015 at 3:05 pm #14781Hi Nick
This kind of work is a little out of scope of support here – you will need to modify your results template to do various things that you want it to do.
Such as adding in conditions – for example a common one would be
if($query->have_posts()) { //this means there are results - run the loop/results } else { //show message when there are no results }
Taken from: https://codex.wordpress.org/Function_Reference/have_posts
If you want to do specific things when there are no results found, then you must develop this feature yourself as it is very specific to your needs.
Thanks
Ross Moderator(Private) April 13, 2015 at 8:11 pm #15009Hi Nick
This is a template issue which is defined by your theme, so theres not much more I can do without digging around your theme and trying to figure out what its doing.
It sounds like to me that you just need a hand customising your results template, so it shows posts under certain conditions and not others.
There are plenty of resources on this you can find via a google search, just so you know, creating a template for Search & Filter (if using ‘display results’ -> ‘as archive’ in settings) is just the same as creating a regular WP search template, or an archive template – here is a link which has some examples of behaviours you can add:
http://jamescollings.co.uk/blog/wordpress-search-results-page-modifications/
If you are unable to make the modifications I suggest asking for help on WP websites as I am unable to do this for you.
Thanks
-
AuthorPosts