Forums › Forums › Search & Filter Pro › Results not refresh
- This topic has 22 replies, 3 voices, and was last updated 9 years, 1 month ago by
Ross.
-
Anonymous(Private) April 3, 2016 at 6:58 pm #41417
Hi Guys,
I installed the plugin and it works great, but I do have 2 problems that I’m unable to fix with the plugin and would love some help, my site is still on local server so cant share a link but
1. I want the search results to come back without refresh (ajax), when pressing any of the filters I can see the URL change but the page itself is not changing, if I press enter on the URL it works great, I would like the results to refresh when pressing the filter (tried to change all the options but seems like a bug).
2. I have a custom fields with 2 options, the user can choose if the post is type 1 or type 2 and I would like to be able to filter this options, I added the meta tag with the custom field name but the filter does not appear on the front end, I use ACF with radio button to let the user choose and marked the ACF box in the filter options but still it looks like the filter does not recognize the field since it shows 0 results for the posts.
Thanks for the help,
Alon
Trevor(Private) April 3, 2016 at 7:09 pm #41420It is difficult to advise without seeing, but some basic questions, if I may? What display results method did you you? Is the results and search page the same page, or does the search go to a different results page? What theme or theme framework are you using?
Also, with ACF, the fields appear twice in the select box where you select the field you want. They appear once with an underscore to start with, like
_my-field
and than further down asmy-field
. It is that latter that you need.Anonymous(Private) April 3, 2016 at 9:10 pm #41428Hi Trevor,
Thanks for the replay,
Yes, they are the same page, the search only need to work on that page.
The search method is a custom post archive, it search only one CPT, The theme is a custom built theme very clean with no JAVA script errors and no special plugins. the search works as expected but only on first press on a filter, after what ever I do nothing change.I dont understand what you say about the ACF, I see one check box to mark that it is an ACF field (is acf field) and I choose the field itself under post meta > choice > meta key, it display the field and the values if I dont choose the “hide empty”, but no results return when searching, and it always show them as 0 count.
Anonymous(Private) April 3, 2016 at 9:13 pm #41429I will just add the I use a sidebar for dispalying the search results and I’m adding the code of the template for you to see since you can not see the page itself.
<?php get_header(); ?>
<div class=”container classroom”><?php if ( function_exists(‘yoast_b
crumb’) ) {
yoast_breadcrumb(‘<p id=”breadcrumbs”>’,'</p>’);
} ?><header>
<?php the_archive_title(‘<h1 class=”blue title-big”>’,'</h1>’); ?>
<form class=”search” action=”/” method=”get”>
<label for=”search”></label>
<input type=”hidden” value=”classroom_resources” name=”post_type” /><i class=”fa fa-search”></i>
<input type=”text” name=”s” id=”search_classroom” placeholder=”Search Resources” value=”<?php the_search_query(); ?>” />
</form>
</header><main class=”inner-wrap”>
<article>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class=”post”>
<?php the_post_thumbnail(‘classroom’);?>
<h2>“><?php the_title();?></h2>
</div>
<?php endwhile; ?><?php else : ?>
<p><?php _e(‘No posts found. Try a different search?’,’lookstein’); ?></p>
<?php endif; ?>
</article>
<?php get_sidebar(‘classroom_resources’); ?>
</main>
</div>
<?php get_footer(); ?>
Trevor(Private) April 4, 2016 at 7:37 am #41448Hi
When posting code, please use the
code
tag button before and after the code, or else the forum software changes many of the special characters and that makes it hard to read.You say, I choose the field itself under post meta > choice > meta key, what is that field name as it is in that select box. Maybe you can share a screen shot for me to see (you need to save the screenshot to an image sharing site and use the image button on this editor to insert it).
-
AuthorPosts