Forums › Forums › Search & Filter Pro › Search Results Loading on Page Load
Tagged: advanced custom fields, search results
- This topic has 6 replies, 2 voices, and was last updated 6 years, 7 months ago by Trevor.
-
Anonymous(Private) April 6, 2018 at 3:34 pm #170630
I just purchased your plugin and am working in a dev environment using the JoinstWP theme. I have created a search to check pages based off of categories created using advanced custom fields.
I added the following shortcodes to my template and when I load the page it is listing the first 10 pages before a search has even happened.
`<?php echo do_shortcode(“[searchandfilter id=’3399′]”); ?>
<?php echo do_shortcode(“[searchandfilter id=’3399′]”); ?>Also, the advanced custom field which I added to the search via post meta returns 0 results even though I have pages with that field checked.
Anonymous(Private) April 6, 2018 at 4:15 pm #170641Hi Trevor,
I posted the snippet of code twice by accident. The other should have been the results snippet.
I tried the custom method for the results using $args[‘search_filter_id’] = 3399; in my custom query and that does not have the same bug of displaying results without hitting submit.
Your direction for the acf field worked, thank you!
I am using masonry for my template to load the items. Currently, using the custom query method I am getting the styling pulled through, how would I get the results to work with the masonry on the page?
Trevor(Private) April 6, 2018 at 4:21 pm #170645The best advice I can give on Masonry is to read this post:
https://support.searchandfilter.com/forums/topic/reload-masonry-grid-after-ajax-call/
-
AuthorPosts