Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.
1 vote
Accepted

How to set up hierarchical relationships without using plugins / meta query

You should use taxonomies to store your relationships. Sidenote: A possible answer was to make the releases children of the artists using the classic post_parent field, however a post can only have 1 ...
user avatar
  • 51.9k
1 vote
Accepted

Count posts per taxonomy else change taxonomy if less than x number

I'm guessing you are using a tax_query here. If you try to query multiple categories or taxonomies, the terms field expects an array $args = array( // other query arguments 'tax_query' => ...
user avatar
  • 41
1 vote
Accepted

How to add custom meta to 'pre_get_terms'?

Most likely because the query is also searching for a match against the term name/slug, as opposed to "match either term name or meta field". If you don't need the search to also look for ...
user avatar
  • 34.9k
1 vote
Accepted

How to add $args to any running wp_query from function.php?

Use a pre_get_posts hook to modify the relevant query variables, with conditional tags to target specific pages/queries (and probably return from the callback early on is_admin() so you do not affect ...
user avatar
  • 5,210

Only top scored, non community-wiki answers of a minimum length are eligible