Count posts by slug
-
I want count my posts by multyple slugs/slug, where post have – all slugs exemple (slug1, slug2, slug3 ), i tried with
$terms = get_terms(“adstags” , “slug=slug1&slug=slug2&slug=slug3”);
$count = count($terms); – is wrong….I found some code
$myquery = array(
array(
‘taxonomy’ => ‘adstags’,
‘terms’ => array(‘slug1’),
‘field’ => ‘slug’,
),
array(
‘taxonomy’ => ‘adstags’,
‘terms’ => array(‘slug2’),
‘field’ => ‘slug’,
),
);I do not know how to implement get_terms
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Count posts by slug’ is closed to new replies.