Forums › Forums › Search & Filter Pro › Search Fields Disappear When Enabling Auto Count
Tagged: auto count
- This topic has 9 replies, 2 voices, and was last updated 4 years, 3 months ago by Trevor.
-
Anonymous(Private) September 11, 2020 at 1:05 pm #259159
Hi
I have recently installed the S&F plugin on my dev site and trying some things out.I have discovered an issue where, although all search fields appear initially on page load, when a selection is made, all the subsequent drop down fields disappear (the slider for numbers remain.)
https://dev.truckpages.co.uk/bespoke-results-page/
and searchbar on the side of a taxonomy page
https://dev.truckpages.co.uk/trucks/for-sale/daf/
Many thanks
Jason
Anonymous(Private) September 14, 2020 at 11:44 am #259304Thank you for looking at this for me – while you are looking at the above, I have another question regarding the functionality.
I understand that I can enter a filter for the tags and taxonomies into a search form. I can’t see whether I can add a filter for the search box.
This would enable me to create bespoke search results pages where the underlying data does not have a field for this. This would search on the title and description and display relevant results.
Thanks
Trevor(Private) September 15, 2020 at 2:32 pm #259495If you want the text search field to be able to search data in addition to the Title and Content, note that our plugin does not directly allow you to do text searches of individual Post Meta (custom fields) and Taxonomy (Category, Tags and Taxonomies) data/terms. The Search & Filter Pro Text Search field uses the standard WordPress search, so looks only in the Post Title and Content. To help you control this better, on the form’s Advanced settings tab you will see 2 settings for Relevanssi.
The documentation for this is here:
https://www.designsandcode.com/documentation/search-filter-pro/3rd-party/relevanssi/
You would need to install and activate the free Relevanssi plugin as well.
Then set Relevanssi up and build its index (make sure it is indexing the desired post types, custom fields AND any taxonomy that you want to search).
I will follow up in a short while to the issue that you first asked about.
Anonymous(Private) September 15, 2020 at 3:43 pm #259506Hi
This seems to do the trick regarding the missing fields – I also had it working without ajax on the search results, but it loaded the page every change.
I have installed relevanssi and it seems to be doing everything I hoped it might.
On my other question regarding:
I understand that I can enter a filter for the tags and taxonomies into a search form. I can’t see whether I can add a filter for the keyword search box.
This would enable me to create bespoke search results pages where the underlying data does not have a field for this. This would search on the title and description and display relevant results.
To give you an example, saving the results of this search, https://dev.truckpages.co.uk/trucks-for-sale1/?_sf_s=council%20tippers into a WPBakery grid and having some relevent content surrounding it on the page. This would mean that I could have bespoke landing pages for content that I have no taxonomies for (Council tippers in this example)
Do you have any thoughts/documentation on how I might achieve this as it would make this quite a powerful tool?
Thanks
JasonAnonymous(Private) September 15, 2020 at 5:26 pm #259544Thank you for your help on this. The only issue remains if I use a from/to set of boxes for the meta (Years) etc.
These now disappear and there is no option for the combo box – all sliders are a little unwieldy (especially on mobile) but this seems to be the only viable alternative.
Can you see any other options?
Thanks
Trevor(Private) September 16, 2020 at 12:40 pm #259657I think you will need to add this JavaScript to the page:
<script> (function ( $ ) { $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ $('.sf-field-post-meta-ca-year select.sf-input-select').select2({minimumResultsForSearch: -1}); }); }(jQuery)); </script>
-
AuthorPosts