I have a custom field status which has 3 options unused, in progress and completed. I want to display how many posts with type of status. ex how many are marked completed. I am not sure how to do this. I do know some coding but not enough to figure this out on my own. Any help would be appreciated.
There is not an easy way to do this. You would need to do a query for each of the values and count the posts returned. For example
// status completed
$args = array(
'post_type' => 'your post type',
'post_status' => 'publish', // or whatever
// other WP_Query arguments as needed
'fields' => 'ids', // return only post IDs, since we just need to get a count
'meta_query' => array(
'key' => 'your field name',
'value' => 'complete'
$results = new WP_Query($args);
$completed = count($results->posts);
Clients need flexibility. Developers need a repeatable workflow that doesn’t have a steep learning curve. See how digital marketing agency Noiza found both with Advanced Custom Fields in our latest case study.https://t.co/BxQAy6COJt