What happens if you use the standard pagination code, as seen in our default results.php file?
Thanks.
In you theme folder, make sure you have a sub-folder named search-filter
In that folder place the results.php
file
Also in there place the second results file and name it 373.php
AnonymousInactive
Thank you for your prompt reply. I think it was a caching related issue. I created a new search form and for now everything works fine. I’m trying to have different “templates” for each posts type search/filter form, without resorting to “form-id.php”, the default way – its difficult when you have many forms and languages. Instead I want to use only results.php and conditionals for each post type and hopefully reach the same outcome.
Can you rename the 2343.php file to stop it being used and instead us a default results.php template and see what happens?
Are you using our Shortcode display results method? You might find this post a better method:
https://support.searchandfilter.com/forums/topic/how-can-i-search-elemntor-column-while-retaining-the-design-of-that-column/#post-209754
If you want to continue to use the shortcode method, pagination can be styled (with numbers) using the free WP-PageNavi plugin. If you want to use Infinite scroll instead, you must copy the contents of the infinite scroll results PHP template found in the templates folder of our plugin, create a folder in your child theme folder named search-filter
and make a new file there called results.php
with the content of that exemplar file.
Then it is likely you would need to add some PHP to that template file.
Look in our plugin folder on your server and you will find a folder named templates. Take a look at the results.php file.
At the start, just inside the if have posts part is the count. The query array name we use is $query, yours may be different, but the code will give you an idea. Make sure you are using a child theme, not a master theme.
AnonymousInactive
I use CF7 under each result block. To send CF7 data to E-mail. I wrote the appropriate shortcode in results.php.
It is necessary that CF7 data be sent to E-mail.
AnonymousInactive
I have seen this topic and made the same changes, but without result.
I copied the results.php file in the theme folder, and changed the name of the file to its ID: 754.php
I have added the codes in the file, but the taxonomy “subgroup” is not shown:
<p><br /><?php the_excerpt(); ?></p>
<?php
if ( has_post_thumbnail() ) {
echo '<p>';
the_post_thumbnail("small");
echo '</p>';
}
?>
<?php
$taxonomy_terms = wp_get_post_terms(get_the_ID(),'subgrupo');
foreach($taxonomy_terms as $term){
$terms[] = $term->name;
}
if(!empty($terms)) {
echo join(", ", $terms);
unset ($terms);
}
?>
<p><?php the_category(); ?></p>
<p><?php the_tags(); ?></p>
<p><small><?php the_date(); ?></small></p>
</div>
I’m doing something wrong …
So you copied the infinite scroll version of the results.php file to your child theme into a folder named search-filter
and renamed the file to results.php?
AnonymousInactive
Hi Trevor,
I’ve been modifying the Search and Filter Pro results.php file to output custom elements, mainly using custom fields too.
I have created a field in a custom Taxonomy “Hut Type” and am wondering if it is possible to output this in the results.php file?
So say I have filtered by a “Hut Type” and the page has reloaded with the query string in the URL, is there a way to get the results.php file to output the field located in that Hut Type if it has been filled in?
The Hut Type is a radio field too if this is any help.
I look forward to hearing back from you, please let me know if you need any further clarification?
Thanks,
Alex