Skip to content

Instantly share code, notes, and snippets.

@greenhornet79
Last active August 2, 2016 15:03
Show Gist options
  • Save greenhornet79/53c8cb6b6814c736e5796dc7e5914907 to your computer and use it in GitHub Desktop.
Save greenhornet79/53c8cb6b6814c736e5796dc7e5914907 to your computer and use it in GitHub Desktop.
<?php
// didn't work
$term_args = array(
'taxonomy' => 'issuem_issue', // passed as a string
'meta_query' => array(
array(
'key' => 'old_id',
'value' => 123,
'compare' => '='
)
)
);
$term_query = new WP_Term_Query( $term_args );
// did work
$term_args = array(
'taxonomy' => array( 'issuem_issue' ), // passed as an array
'meta_query' => array(
array(
'key' => 'old_id',
'value' => 123,
'compare' => '='
)
)
);
$term_query = new WP_Term_Query( $term_args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment