-
AuthorSearch Results
-
May 3, 2019 at 11:54 am #210037
AnonymousInactiveHi Trevor,
I’ve done what you’ve suggested by copying over the results.php using the code from the infinite scroll file and have changed the results to be shortcode. However, this still doesn’t fire the AJAX infinite scrolling 🙁 Are you able to have a look at what might be causing this please?
May 2, 2019 at 4:19 pm #209922
TrevorParticipantWhy not try our shortcode method (to test) and use the infinite scroll results.php with that (you have to copy over the file to the child theme folder and rename it to results.php), see here for instructions:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/
(the file has to be named results.php but needs the contents of the infinite scroll version)
April 26, 2019 at 6:50 am #209381In reply to: Display selected filters
AnonymousInactiveOk, thank you! I think about it. I have one more question: I use Post Views Counter Plugin, and when i place
pvc_post_views();
function inside results.php template (address:/wp-content/themes/mytheme/search-filter/results.php) My filtering results are crashing (display nothing), when i click on filter buttons. What i need to do?April 23, 2019 at 11:30 am #208913In reply to: Problem with the taxonomies I made
TrevorParticipantMy apologies for the delay in replying. In the UK we have had a long 4 day national holiday weekend this last weekend.
To your question. For example,
argomenti
?Did you make a custom version of the results.php file, as detailed here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
It will require some custom code in that file, in the location/line where you want the terms output. For example, for argomenti, it would be something like this (but you can add your own HTML and classes etc):
$taxonomy_terms = get_terms('argomenti'); foreach($taxonomy_terms as $term){ $terms[] = $term->name; } if(!empty($terms)) { echo join(", ", $terms); unset ($terms); }
April 15, 2019 at 11:44 pm #208449In reply to: show results only after clicking search
AnonymousInactiveHere I have to add something, I have several pages and in each one I use a different personalized filter, each page corresponds to a department of Colombia, therefore, what we are looking for, is that the search result only brings results from that department, that’s why, if you go to the next two pages, you can see that the filter results are different.
https://www.starpets.com.co/antioquia/
https://www.starpets.com.co/cundinamarca/This I clarify, since after reviewing the help forum, I found this answer that you gave previously to a user https://support.searchandfilter.com/forums/topic/prevent-empty-search-fetching-results/#post -185868 but I do not know if it applies to my project, since here you indicate that you should replace the id of the page, but if there are several forms and each one has a different id, how can I achieve what you indicate?
and so the code of my results.php file is displayed:
<?php /** * Search & Filter Pro * * Sample Results Template * * @package Search_Filter * @author Ross Morsali * @link https://searchandfilter.com * @copyright 2018 Search & Filter * * Note: these templates are not full page templates, rather * just an encaspulation of the your results loop which should * be inserted in to other pages by using a shortcode – think * of it as a template part * * This template is an absolute base example showing you what * you can do, for more customisation see the WordPress docs * and using template tags – * * http://codex.wordpress.org/Template_Tags * */ if ( $query->have_posts() ) { ?> Found <?php echo $query->found_posts; ?> Results<br /> Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br /> <div class="pagination"> <div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div> <?php /* example code for using the wp_pagenavi plugin */ if (function_exists('wp_pagenavi')) { echo "<br />"; wp_pagenavi( array( 'query' => $query ) ); } ?> </div> <?php while ($query->have_posts()) { $query->the_post(); ?> <div> <h2>"><?php the_title(); ?></h2> <p><br /><?php the_excerpt(); ?></p> <?php if ( has_post_thumbnail() ) { echo '<p>'; the_post_thumbnail("small"); echo '</p>'; } ?> <p><?php the_category(); ?></p> <p><?php the_tags(); ?></p> <p><small><?php the_date(); ?></small></p> </div> <hr /> <?php } ?> Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br /> <div class="pagination"> <div class="nav-previous"><?php next_posts_link( 'Older posts', $query->max_num_pages ); ?></div> <div class="nav-next"><?php previous_posts_link( 'Newer posts' ); ?></div> <?php /* example code for using the wp_pagenavi plugin */ if (function_exists('wp_pagenavi')) { echo "<br />"; wp_pagenavi( array( 'query' => $query ) ); } ?> </div> <?php } else { echo "No Results Found"; } ?>
I do not know if there is something wrong here too, because in the page where I’m trying to find the code, at the end of the results, this comes out:
global $searchandfilter; $sf_current_query = $searchandfilter->get(2101)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()==””)) { echo ‘
Nothing to see here folks!
‘; } else { // your template archive code/loop OR results.php code here }April 15, 2019 at 10:39 am #208370In reply to: Read more links are missing?
TrevorParticipantThe guide for customization is here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
You need to copy the results-infinite-scroll.php file to the search-filter sub folder of your child theme folder, and then rename that to results.php.
You would need to add some PHP/HTML to create the link, like this:
<div class="readmorelink"><a href="<?php the_permalink(); ?>">Read more ....</a></div>
April 10, 2019 at 3:36 pm #208043In reply to: It disappear when clicking
TrevorParticipantSo, if we agree it is working now, try using your modified results.php file. If it does not work with that, then the content of that modified file is the issue.
April 10, 2019 at 9:38 am #207987In reply to: Using a Shortcode > Avada
AnonymousInactiveHi Trevor,
The page with the Search & Filter module: https://infocondensatieketel.be/checklist/ with settings > Using a Shortcode and the results.php (copy from search-filter-pro/templates) in the /search-filter folder in the Avada child theme.
The search result shows the featured images of the respective posts with the images among each other, and without link to the product (= post).
The only search criteria are 3 post categories (one category & 2 taxonomies) and the only results I want to show are the respective post titles with featured image, something like on https://infocondensatieketel.be/merken/remeha/ under ‘Alle condensatieketels’ but with title.
Kind regards,
Roel
April 9, 2019 at 5:16 pm #207932In reply to: It disappear when clicking
TrevorParticipantI just want to see how the form relates to a ‘standard’ results.php template, not to delete the one you have.
April 5, 2019 at 2:08 pm #207645
TrevorParticipantWhat Display Results Method are you using? If it is shortcode, then the guide for customization is here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
You need to copy the results-infinite-scroll.php file to the search-filter sub folder of your child theme folder, and then rename that to results.php.
-
AuthorSearch Results