Last active
February 4, 2018 22:25
-
-
Save tonydjukic/cdf8e1d47a4a3fe3a440bffe5227a89d to your computer and use it in GitHub Desktop.
Nested WP Query Arguments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sitesuper_notification_args = array( | |
'post_type' => 'cs_submissions', | |
'post_status' => 'publish', | |
'posts_per_page' => -1, | |
'orderby' => 'date', | |
'order' => 'DESC', | |
//The meta_query will list any customer satisfaction survey responses that answered a question negatively or below an accepted threshold. | |
//It also only lists those items that have NOT yet been flagged as 'resolved'. | |
'meta_query' => array( | |
'relation' => 'OR', | |
array( | |
'relation' => 'AND', | |
array( | |
'key' => 'overall_rating', | |
'value' => 8, | |
'type' => 'numeric', | |
'compare' => '<=' | |
), | |
array( | |
'key' => 'overall_rating_resolved', | |
'value' => 'false', | |
'compare' => '=' | |
), | |
), | |
array( | |
'relation' => 'AND', | |
array( | |
'key' => 'frontdesk_staff', | |
'value' => 'false', | |
'compare' => '=' | |
), | |
array( | |
'key' => 'frontdesk_staff_resolved', | |
'value' => 'false', | |
'compare' => '=' | |
), | |
), | |
array( | |
'relation' => 'AND', | |
array( | |
'key' => 'recommend_us', | |
'value' => 'false', | |
'compare' => '=' | |
), | |
array( | |
'key' => 'recommend_us_resolved', | |
'value' => 'false', | |
'compare' => '=' | |
), | |
), | |
), | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: This has repeatedly caused a gateway timeouts on some low resource servers.