AnonymousInactive
Hey Trevor,
Thanks first of all.
The site is: http://devcenter.pt/aptcci/directorio-de-psicoterapeutas/
In the template I changed the_excerpt(); for the_content(); at /templates/results.php
Thanks bro
AnonymousInactive
Hi – yes, using standard shortcodes – so, I need to edit the results.php template as above to make it work as we need do I?
If you are using the Shortcode results method, and our results.php template file, it would look like this:
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1024)->current_query();
if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
echo '<div>Nothing to see here folks!</div>';
} else {
// your template archive code/loop OR results.php code here
}
Change 1024 to the ID number of your form (from the form shortcode).
You are using our shortcode display results method? That uses a partial template which slots into your page.php template (and that template calls the header, footer etc, so your template, if that is what you are using for the results.php file, has too much in it. Compare it to our standard results.php exemplar (in the templates folder of the plugin).
Not necessarily, it simply indicates that either the theme or a plugin is modifying the query after our filter has been applied, but using the shortcode method usually overcomes this, more so if it is the theme doing this, which is what I had initially though was the case.
You can make the results look much like they do using the theme template on a page. To do this, follow the Customising the Results documentation.
When editing the results.php file, you can see the section that displays the post loop (inside the While … if posts). You can replace this with your theme template loop. That might just work.
You should follow the Customising the Results documentation.
When editing the results.php file, you can see the section that displays the post loop (inside the While … if posts). You can replace this with your theme template loop.
You could make the filters update dynamically to (in the main) prevent a no results search. This is done by going to the General settings tab:
Set Auto Count (both settings) to ON
And then in the Form UI:
In each field set Hide Empty to ON
If you are using our Shortcode method, you should follow the Customising the Results documentation.
When editing the results.php file, you can see the section that displays no results found. You can replace this, or indeed add code there to cause the page to re-direct (you would need to Google how to do that).
If you are using any other Display Results method, then they will be using your theme templates, in which the functionality you seek is dependent on your them.
You could make the filters update dynamically to (in the main) prevent a no results search. This is done by going to the General settings tab:
Set Auto Count (both settings) to ON
And then in the Form UI:
In each field set Hide Empty to ON
If you are using our Shortcode method, you should follow the Customising the Results documentation.
When editing the results.php file, you can see the section that displays no results found. You can replace this, or indeed add code there to cause the page to re-direct (you would need to Google how to do that).
In your server files, in the Avada child folder, you have a sub-folder called search-filter and in that our results.php template. The file is empty. It needs to have the template code in it (see the copy in our plugin folder, in a sub folder called templates.