1
vote
Accepted
change the default order of posts only for specific categories
Problem 1
$foo = is_category( ... );
Is the same as:
global $wp_query; // the main query
$foo = $wp_query->is_category(....);
So when filtering the query, don't check the main query, check the ...
1
vote
How to make posts unqueryable/unpublish posts where ACF relationship field is an unpublished post?
You should probably check out pre_post_update.
Use pre_post_update to check for a post update within your custom post type Container of Things. Check for your conditions. Then, get the connected ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
query-posts × 1237wp-query × 361
custom-post-types × 210
posts × 197
loop × 189
query × 111
categories × 100
custom-taxonomy × 85
get-posts × 82
custom-field × 81
pagination × 63
meta-query × 61
php × 56
post-meta × 52
customization × 44
functions × 40
order × 35
filters × 30
sort × 30
search × 25
plugin-development × 23
archives × 23
plugins × 22
array × 21
taxonomy × 20