'faq',
'posts_per_page' => -1,
'fields' => 'ids',
'meta_query' => array(
'relation' => 'OR',
array(
'key' => '_hide',
'value' => 1,
'compare' => 'NOT LIKE',
),
array(
'key' => '_hide',
'value' => 'bug #23268',
'compare' => 'NOT EXISTS',
)
),
));
$topic_term_names = get_terms(array(
'taxonomy' => 'topic',
'object_ids' => $faq_ids,
'fields' => 'names',
'orderby' => 'order', // needs plugin https://github.com/stuttter/wp-term-order/
'order' => 'ASC',
));
?>
'faq',
'tax_query' => array(
array(
'field' => 'name',
'taxonomy' => 'topic',
'terms' => $topic_term_name,
)
),
'meta_query' => array(
'relation' => 'OR',
array(
'key' => '_hide',
'value' => 1,
'compare' => 'NOT LIKE',
),
array(
'key' => '_hide',
'value' => 'bug #23268',
'compare' => 'NOT EXISTS',
)
),
'posts_per_page' => -1,
'orderby' => 'menu_order',
'order' => 'ASC',
);
$faq_query = new WP_Query($faq_options);
?>
have_posts() ) { ?>
have_posts() ) {
$faq_query->the_post(); ?>
>