Skip to main contentSkip to footer

Another quick bug fix.

  • Fixed the Did you mean -feature, which was broken by the database change.
  • WordPress doesn’t support searching for multiple categories with the cat query variable. There’s now new cats, which can take multiple categories as a comma-separated list.

For some reason, WordPress doesn’t take arguments like ?s=term&cat=1,2 but strips the ‘,2’. Now you can just say ?s=term&cats=1,2 and it’ll work like a charm.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Using multiple custom taxonomies

Usually, WordPress supports one category, one tag and one taxonomy in the search, if you use the query variables to set the taxonomies. You can enter multiple taxonomies as parameters to the query, but only the first one is used. If you want to have multiple taxonomies involved, you need……For taxonomies, having a dropdown select is usually the best option. You can create dropdowns with the wp_dropdown_categories() function. It works for all taxonomies, despite the name. The important thing is to change the ‘name’ parameter for each dropdown. So, in our case, we would have two dropdowns, like this,……in the search form code: wp_dropdown_categories( array( ‘name’ => ‘movie_director’, ‘taxonomy‘ => ‘director’ ) ); wp_dropdown_categories( array( ‘name’ => ‘movie_actor’, ‘taxonomy‘ => ‘actor’ ) ); Introducing the query variables WordPress cleans out unknown query variables for data hygiene reasons. That’s a good thing, but a bit of a complication for…

Related Posts:

Currently there are no related posts available.

Comment Section:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed