WP_Term_Query exclude by meta value
-
I want to store an array of term ids to a variable. The terms are selected such that a certain meta_key != certain meta_value.
I used this code, and always I get “Fatal error: Memory exhausted”.
$args = array( 'taxonomy' => array( 'category', 'post_tag' ), 'meta_query' => array( array( 'key' => 'meta_key', 'value' => 'meta_value', 'compare' => '!=', ), ), ); $term_query = new WP_Term_Query($args);
Is this code correct?
If it is correct, how can I remove the memory error?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP_Term_Query exclude by meta value’ is closed to new replies.