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 ...
user avatar
  • 53.2k
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 ...
user avatar
  • 701

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