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 ...
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' => ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
wp-query × 5557custom-post-types × 852
loop × 702
meta-query × 463
posts × 454
query × 431
php × 382
custom-taxonomy × 375
query-posts × 352
custom-field × 350
pagination × 347
categories × 272
search × 216
order × 199
post-meta × 169
get-posts × 162
functions × 157
taxonomy × 150
ajax × 148
tax-query × 144
pre-get-posts × 143
advanced-custom-fields × 141
filters × 139
woocommerce-offtopic × 129
plugins × 122