WordPress Tips: Get Untagged Articles
Coming straightforwardly to the code, you can utilize the tax_query boundary of WP_Query to carry out.
$wpjam_query = new WP_Query([
'post_status' => 'publish',
'tax_query' => [
[
'taxonomy' => 'post_tag',
'field' => 'id',
'operator' => 'NOT EXISTS'
]
]
]);
Straightforwardly in the WordPress backend article rundown to choose no set classifications can be, and not labeled articles, then, at that point add tag = – 1 in the URL to get.
Leave a Reply