rmorse / search-filter Goto Github PK
View Code? Open in Web Editor NEWSearch & Filter is a simple search and filtering plugin for WordPress
License: GNU General Public License v2.0
Search & Filter is a simple search and filtering plugin for WordPress
License: GNU General Public License v2.0
Hello @rmorse
First I want to thank you for this awesome work!
I was wondering if there is an option to display filters horizontaly. I mean side by side, like for instance under a wide key-words field ?
Ridom
This line in SearchAndFilter::check_posts is not correct:
$this->urlparams .= "post_types=".$post_types;
as WordPress will ignore the post_types variable. Under certain conditions this leads to the wrong template file being selected or even the wrong search results.
I can submit a PR if you like: I suspect tho you may not be happy with the disconnect between your own variable names names and the default names you're later injecting into the URL.
I am testing Search & Filter version 1.2.11 and noticed that the date picker for types="date" does not seem to work in Safari.
Hello,
I'm using the short with date, format fields etc but only category + keyword never works, I get all post from the category but not with the keyword.
How this can be fixed?
Hi There
I have been using the Search and Filter Plugib for my Business Directory. I have a regions module set up and I am trying to create a search and filter box that will allow my users to filter by category and location.
It works but the problem is, it includes ALL the regions.
I only want it to show major districts, in other words, only one level of regions. But its also showing all the towns and suburbs as well.
Does anyone know how I can code the S&F plugin so it will only allow customers to choose from the main level of regions instead of displaying all of them?
The plug in I am using is "Business Directory" and the shortcode I am currently using is [searchandfilter fields="wpbdp_category,wpbdm-region" submit_label="Filter" headings="Categories,Region"]
If anyone can help me Id appreciate it SO MUCH!
Thanks! Nicole
Hi
All Works well but the only thing I will like to change is
<option value="0" selected="selected">All Categories</option>
to something like
<option value="0" selected="selected">My Filters </option>
How can I achieved that
for the checkbox search it shows unselected items also.
As the post_types parameter always adds the value to the URL the empty_search_url is never called.
Changing line 1072 to this fixed the issue for me.
if($this->urlparams=="/?s=" || $this->urlparams=="/?s=&post_types=" . $post_types)
Not sure though if this will work when you have multiple post types specified.
I am using your awesome plugin on a craigslist-esque site and would love to be able to display a "price filter" that has a price range slider, so users could adjust either end of the slider to set their price range.
Alternately, an option to do a "Min/Max" field would work too, but sliders are prettier. :)
For reference: https://jqueryui.com/slider/#range
While the "Search & Filter Prefers Clean URLs" is a great feature. It will be really nice to see an option to turn this off. I find that the clean URLs don't always work the way they're meant to on some themes.
How can I add filters for fields created using Advanced Custom Field. I tried several different shortcodes but none of them works. Please help
Assuming that the date and date range are a select list, I'm having some trouble getting the date range field to show up. Currently it just appears to be a simple text input and type="date" but no default value/choices.
Just using your example shortcodes to test:
[searchandfilter fields="search,post_date" types=",date" headings=",Post Date"]
[searchandfilter fields="search,post_date" types=",daterange" headings=",Post Date"]
[searchandfilter fields="search,post_date,category,post_tag,post_format,taxonomyone,taxonomytwo" types=",daterange,select,select,select,select,select" hierarchical=",1" headings=",Post Date,Categories,Tags,Post Format,Taxonomy One,Taxonomy Two" submit_label="Search Events"]
When a site is delivered via SSL, your CSS file is being blocked by Chrome for not being https. Can you modify your paths for // instead of http://?
For styling purposes I want to run a jQuery function every time after Search & Filter shows new results. Is there some kind of callback to hook into with JavaScript?
On my homepage site ( real estate ) www.mywebsite.com/), I'm using this shortcode:
[searchandfilter taxonomies="search,localita,tipologia,prezzo"]
the layout result is perfect but the query result do not work,.
Localita ( location ) - Tipologia ( type ) - prezzo ( price ) are three Custom field of a specific CPT and are i have created with ACF PRO.
Why it does not work?
Actually i'm using the free version but i'll buy without problem the pro version ( i prefer he lifetime version ) if all can work properly
Thank You for your work
Customer bought the Pro license, how do I either upgrade or get the install package?
Is it possible to tap into custom fields created via Advanced Custom Field plugin and sort by those with this?
I'd like to use this very nice plugin in german and translated already the frontend strings (just temporary 'til next update, I know).
do plan to __() all the strings? so I'll give you a hand with the german translation, and maybe the date/time stuff.
cheers rolf
Hello, is it possibile to search only in Year and not complete date ?
thank you
Is it possible to search only within a single category or set of categories, without including the whole category dropdown?
Hello, I have added a custom metabox to my custom post type. I want to fit this by price, as in real estate themes. How can I do it?
Hi,
I would like to ask you whether this is really needed in style.css
file:
body { display:block; }
Also, I think it would be better to change .widget-area .searchandfilter li, .widget-area .searchandfilter p
to .widget .searchandfilter li, .widget.searchandfilter p
as there is no way for you to tell whether the sidebar in a theme is using .widget-area
class or not, but you can be 99% sure that the widget is wrapped in .widget
class.
Thanks for consideration.
Regards,
Oliver
I added the sort code [searchandfilter fields="search,category,post_tag" types=",checkbox,checkbox" headings=",Categories,Tags"] to a widget, but when I do a search,
The url navigates to: mysite.com/category/business/?tag=make-over-movie+tik-tok&s=test
But I get a 404 url not found on this server error. Why is this happening?
I currently have a CPT for many software connectors and although the description info within the content of those posts is valuable, for search it would be more useful for visitors to search based on post title only. They can always dive deeper in to each post, but currently search yeilds results that may not be related if any of the words in the post types title are within the content area of any given posts.
Consequently, if there is already a way to do this with the S&F plugin, please let me know. I have looked and cannot see any way to do this on the plugin side of things.
HI there I am using this plugin on a ssl (https). In the console I am getting this kind of error :
Mixed Content: The page at 'https://.com/?s=constable' was loaded over HTTPS, but requested an insecure stylesheet 'http://.com/wp-content/plugins/search-filter/style.css?ver=1'. This content should also be served over HTTPS.
Due to this the stylesheet are not loaded, resulting a poor ul and li elements and other.
Is this a bug or It's just me who have done something terrible ?
I am trying to find out where it is so that i can manually go there and make some if and else for http and https.
Hi,
There is an option to add headings to fields in the search & filter plugin: http://docs.designsandcode.com/search-filter/#options
Is there an option to choose which headings to use? I'd like to change them from an <h4>
to something else for accessibility purposes. I'd like to control what headings to use so that it doesn't interfere with the heading order of my website. Thanks!
Update: I've taken a peek in the plugin and see that the headings are being output by the get_search_filter_form
function - is there no way to hook into this? Thanks.
I am using the plugin to do a drop down field based on multiple custom taxonomies.
Inside of cities there are multiple cities. Same with home type and price.
Only the first taxonomy will be rendered. So in this case, cities being first will show the drop down list of all the cities. Hometype will be a blank drop down field (no options are rendered in the html), same with price. However, if I rearrange them so that "Hometype" is first, it will list all of the home types, but then cities will be an empty drop down.
I have my posts page set to "/journal" on www.mysite.com/wp-admin/options-reading.php.
When I run the Search & Filter plugin, the URLs generated look like this, e.g.
www.mysite.com/category/test_category?s=test_term
But what the plugin needs to generate in my case is:
www.mysite.com/journal/category/test_category?s=test_term
Is there a setting I'm missing? Or is there some way to fix this?
Please help if possible. I'd really like to get your brilliant plugin working! Thank you.
On my categories pages (www.mywebsite.com/category/name), I'm using this shortcode:
<?php echo do_shortcode( '[searchandfilter taxonomies="category" submit_label="Search"]' ); ?>
It's possible that the dropdown shows only the sub-categories of the category of the current open page?
For example: Imagine that I'm on the /category/food page (Food is the parent category). This category has three sub-categories: Mexican, French and Italian.
But on my site, I have other parent categories like Travel and Tech and other sub-categories.
When I open a category page, on the drop-down selection, I have all the categories and subcategories on my website, and I only want to show only the three subcategories (Mexican, French and Italian) - the sub-categories associated with the Parent Category of the page that I'm on.
Is it possible?
Thanks
Its prosible plugin work with custom filelds.
http://codex.wordpress.org/Custom_Fields
My forms show just fine, but I am not getting any results at all.
I am using the following short code.
<?php echo do_shortcode( '[searchandfilter fields="search,category,post_tag" taxonomies="category,post_tag" hierarchical="1" submit_label="Filter"]' ); ?>
I am using a standard loop, and after filtering a category, tag, or search term end up with no results.
Any ideas?
Please can someone help me out.
I want the all posts in all categories to display by default, then website users can use the search and filter and the submit button to trim down the shown items according to their choice.
Please how can this be achieved
Using the get_header
action is too late to call check_posts as some themes such as Sage call do_action('get_header') after output has already started resulting in an error when wp_redirect()
is called by check_posts()
. Could you use the wp
action? Seems to work for me.
I saw this filter form at Ted.com: https://www.ted.com/talks?language=en&sort=newest&topics%5B%5D=Technology&event=tedglobal
It's really convenient to be able to remove specific filters. Would it be possible to incorporate Search & Filter with something like this?
Hi,
I have some experience of html/css/js but am newish to php and completely new to wordpress.
I've been tasked by some people to change the way the search form looks and I think I've done that, though perhaps in a completely hacky way (ie I've just changed the plugin code itself so it'll be overwritten when/if it is updated - though I have a copy).
Anyway, I have also been asked to implement a 'live search/filter'. I already have event handlers on the multiple select checkboxes I'm using, so I can initiate a filter at that point, but I'm wondering how I can query wordpress (it's a database, right?) to get the search/filter results in json so I can then show/hide appropriately.
Any advice on doing this?
Thanks,
Max.
Hi there,
Could you plesae help me to understand how can i filter by author? I'm using the author in fields array but it doesn't work.
Thanks,
Some small fixes are needed in order to enable translation of this plugin at translate.wordpress.org:
Reference: https://wp-info.org/tools/checkplugini18n.php?slug=search-filter
Your text-domain must be equal to the plugin slug. In the declaration and in every call to the translation functions, you need to use: "search-filter" instead of "searchfilter".
I didn't search your code to check if you're calling load_plugin_textdomain() correctly. But if you set "Requires at least" in Readme to 4.6 or later (which by now should be a rather safe thing to do), then you don't need that command.
http://wordpress.org/support/topic/retain-filter-selections-after-submit?replies=15
Pasted from WP:
reagantrose
Excellent plugin! Thanks for all your work!
I have one bug/feature request.
I have three taxonomies that I am using to filter by. All use drop down selects. If I select a tax from all 3 drop-downs and click "Submit" the results filter perfectly and it returns the posts just as it should. However, in my drop downs it only retains the first filter's selection. The other two are set to "All".
I think it would be a better user experience if they all were able to retain the selection the user made before clicking submit, in case the user wants to refine her search further.
I hope that was clear. Thanks!
see http://www.send.org/opportunities/ to see what I mean.
We have using a multiple short code on tab based same page but pagination conflict.
When A shortcode pagination fire, Auto updated value in Shortcode WIth B.
Please suggest better way to fix this.
I found a plugin that allows me to add custom fields to posts (Age for instance)
Using this filter plugin I would like to filter by Age custom field. How can I archive it?
Please see the issue here:
https://wordpress.org/support/topic/post-date-filter-bug/
Basically, you are always trying to explode() using the + symbol, but this is missing when only use one date parameter, meaning the query breaks down and returns nothing.
running a site on https gives you a warning of insecure content because it's trying to load the plugin style.css file through http.
see line 31 of search-filter.php
see: https://wordpress.org/ideas/topic/wp_plugin_url-doesnt-take-ssl-into-account
and: http://codex.wordpress.org/Determining_Plugin_and_Content_Directories
I don't have time to put together a pull request for you on this, but it would be a wise change...
Using operators="OR" has no effect on our filtering. We have 5 fields and use operators="OR,OR,OR,OR,OR" but nothing changes. It still seems to use AND.
First of all, thanks for writing this - this really saved me on a project with a very tight budget. I'm grateful I found it.
If I can ask a possibly stupid question: what is the point of submitting the form via POST and then essentially just re-writing all the variables as a query string? Would it not be simpler to generate the right form fields to submit a GET query initially? Is there something I'm missing?
I am currently using the non-pro version of Search & Filter which is great! I want to enable search for documents stored in the media library - am I able to do that by upgrading to Search & Filter Pro?
When I change submit labe to my language ("etsi") and save the form, it reverts back to "submit".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.