-
AuthorSearch Results
-
November 28, 2019 at 1:54 pm #227927
In reply to: Result page and form filter
TrevorParticipantThank you for contacting us.
To stop the form from going to the results until the submit button is clicked, please disable the Auto Submit option, shown here:
https://www.screencast.com/t/x1hr77AlzK
You are using the post Type Archive display results method, so it will not be using the results.php file; this method uses your theme template file for that post type.
The form is displayed on a page using a widget or shortcode. You would not place the form inside our results.php template file. So, for example, add a sidebar to a page and add a widget. Or, if you use a Page Builder, add a text element and place the shortcode inside that.
I do not understand these questions:
On the results page, I don’t need to navigate the page numbers. That is, 1,2,3,4,5 … should be clickable
And the shape of the filter is displayed at the top, and I need to place it on the left. How to implement this?Can you show me what you want maybe with annotated screenshots (you will need to upload images to an external file sharing site, like dropbox, and share the link with me.
The pagination on your current results page comes from the theme template file.
November 27, 2019 at 4:06 pm #227813In reply to: ajaxformfinish wont run my code
TrevorParticipantIt needs to be on the results page. In that code I don’t see the results shortcode?
It can work inside the results.php file, but not inside the if and while loops.
November 23, 2019 at 5:19 pm #227470
AnonymousInactiveHi everyone, I’m trying to figure out a small problem I’m having with the filter. I’ll try to explain as best as possible but I’m not very tech savvy so my apologies. Right now I have it set up as Display Results using Post Archives but when you filter, you get the correct results but the filter disappears. I also tried using the shortcode method but its not using the blog grid method in Avada. I understand it’s using the results.php super basic layout which i don’t want. Here is the site – http://www.immuware.com/news/
Any help would be appreciated thank you!
November 21, 2019 at 9:03 pm #227283In reply to: Featured Image gone when I select 2 categories
TrevorParticipantThinking about this some more, that script may need to be on the page, not in our results.php file.
November 21, 2019 at 9:02 pm #227280In reply to: Featured Image gone when I select 2 categories
TrevorParticipantThe solution might necessitate some experimentation. It is necessary to initialize Page Builders shortcodes again after an Ajax call (so, if you turned off Ajax in our form, the issue is likely to go away).
Try adding this script to the page (you can add it to the start of the results.php file, outside of a php block:
<script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ console.log("ajax complete"); $(.search-filter-results).vc_js(); }); }(jQuery));</script>
I am unsure if this will work. If it does not, I may need to ask our developer to take a look.
November 19, 2019 at 4:39 pm #227023In reply to: Social Media Sharing Issue
AnonymousInactiveYes it does but whichever template I choose doesn’t affect the layout because it’s using the results.php template.
November 18, 2019 at 5:36 pm #226955In reply to: Social Media Sharing Issue
TrevorParticipantDo you have the PHP code from the current page template for the while have posts part of the loop?
You could probably edit our results.php – place the edited copy in the child theme sub-folder mentioned here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
And replace that part of our exemplar code with that of your theme template?
November 18, 2019 at 4:34 pm #226945In reply to: Infinite Scroll
AnonymousInactiveHi Trevor,
Apologies I’ve only just gotten around to trying this out, at the minute I get both messages coming up and I’m not entirely sure why, this is my results.php file.
<?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() )
{
?>
<div class=”flex-grid” data-aos=”fade-up”>
<?php
while ($query->have_posts()){
$query->the_post();
?>
<div class=”RoleGridWrapper col”>
<?php if( get_field(‘scrub_colour’) == ‘navy-blue’){ $postcolor = ‘#153F74’; } ?>
<?php if( get_field(‘scrub_colour’) == ‘cornflower-blue’){ $postcolor = ‘#5184C4’; } ?>
<?php if( get_field(‘scrub_colour’) == ‘mediterranean-blue’){ $postcolor = ‘#009EC7’; } ?>
<?php if( get_field(‘scrub_colour’) == ‘ocean-blue’){ $postcolor = ‘#64BFD4’; } ?>
<?php if( get_field(‘scrub_colour’) == ‘pale-sky-blue’){ $postcolor = ‘#97BADE’; } ?>
<?php if( get_field(‘scrub_colour’) == ‘dark-green’){ $postcolor = ‘#00A296’; } ?>
<?php if( get_field(‘scrub_colour’) == ‘mid-green’){ $postcolor = ‘#92CEBD’; } ?>
<?php if( get_field(‘scrub_colour’) == ‘silver-grey’){ $postcolor = ‘#ABAAAB’; } ?>
<div class=”roleContWrapper” style=”border-top: solid 10px <?php echo $postcolor; ?>”>
<div class=”cardTAB”>
<svg id=”scrubsIcon” data-name=”Layer 1″ xmlns=”http://www.w3.org/2000/svg” viewBox=”0 0 40 40″><title>Scrubs Icon</title><path style=”fill:<?php echo $postcolor; ?>;” d=”M39.6,7.22a40.13,40.13,0,0,0-13-4.12,1.11,1.11,0,0,0-1.39.72c-.43.91-.88,1.73-.92,1.8-1.72,3.28-3.54,6-4.18,6.19-.66-.16-2.48-2.63-4.25-5.63-.46-.76-.8-1.42-1.25-2.28a1.29,1.29,0,0,0-1.52-.77A37.94,37.94,0,0,0,.4,7.22a.78.78,0,0,0-.32,1L3.47,15a.79.79,0,0,0,.9.41l3.49-.87L6.78,36.11a.79.79,0,0,0,.79.83H32.43a.79.79,0,0,0,.79-.83L32.14,14.57l3.49.87a.79.79,0,0,0,.9-.41l3.39-6.78A.78.78,0,0,0,39.6,7.22Z”/></svg>
</div>
“>
<h3 class=”postHeader”><?php the_title(); ?></h3>
<div class=”postCATS”>
<?php
$categories = get_the_category();
$parentCatName = get_cat_name($categories[0]->parent);
if ( ! empty( $categories ) ) {
?>
<span class=”parentCAT”><?php echo esc_html( $parentCatName ); ?></span>
<?php
}
?>
</div>
<p class=”postIntro”><?php the_field(‘brief_role_description’); ?></p>
<div class=”readmoreWrapper”>
<p class=”postreadmore” href=”<?php the_permalink(); ?>”>Learn more</p>
</div>
</div>
</div>
<?php
}
}else{
//figure out which type of “no results” message to show
$message = “noresults”;
if(isset($query->query[‘paged’])) {
if($query->query[‘paged’]>1){
$message = “endofresults”;
}
}
if($message==”noresults”) {
?>
<div class=’search-filter-results-list’ data-search-filter-action=’infinite-scroll-end’>
<span>No Results Found</span>
</div>
<?php
} else {
?>
<div class=’search-filter-results-list’ data-search-filter-action=’infinite-scroll-end’>
<span>End of Results</span>
</div>
<?php
}
}
?>Can’t seem to see why it’s not choosing one or the other, the only way at the moment I can get it to find no results is to search for something that I know isn’t available.
Thank you
ScottNovember 12, 2019 at 5:41 pm #226404In reply to: Infinite Scroll
TrevorParticipantAre you using our shortcode display results method?
If so, this is a modified exemplar results.php file to account for this behavior:
<?php /** * Search & Filter Pro * * Sample Results Template * * @package Search_Filter * @author Ross Morsali * @link http://www.designsandcode.com/ * @copyright 2015 Designs & Code * * 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 /> <div class='search-filter-results-list'> <?php while ($query->have_posts()) { $query->the_post(); ?> <div class='search-filter-result-item'> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></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> <hr /> </div> <?php } ?> </div> <?php } else { //figure out which type of "no results" message to show $message = "noresults"; if(isset($query->query['paged'])) { if($query->query['paged']>1){ $message = "endofresults"; } } if($message=="noresults") { ?> <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'> <span>No Results Found</span> </div> <?php } else { ?> <div class='search-filter-results-list' data-search-filter-action='infinite-scroll-end'> <span>End of Results</span> </div> <?php } } ?>
November 11, 2019 at 3:54 pm #226284
TrevorParticipantI assume you are using custom results.php files, so can you upload the one for this page to a file sharing site and share the download link for that with me?
-
AuthorSearch Results
-
Search Results
-
Hi everyone, I’m trying to figure out a small problem I’m having with the filter. I’ll try to explain as best as possible but I’m not very tech savvy so my apologies. Right now I have it set up as Display Results using Post Archives but when you filter, you get the correct results but the filter disappears. I also tried using the shortcode method but its not using the blog grid method in Avada. I understand it’s using the results.php super basic layout which i don’t want. Here is the site – http://www.immuware.com/news/
Any help would be appreciated thank you!