Term count by user

I am developing a section on the front of our website. Our users submit properties to our directory. we would like to show how many properties they have listed and what types. I have got this code but it shows all post counts by all users I just want to show their post count so it would be like Residential Properties: 15. This is the code I am using can anyone tell me where I have gone wrong.

$term = get_term( 110, ‘property_type’ );
// WP_Term_Query arguments
$args = array(
‘taxonomy’ => array( ‘property_type’ ),
‘name’ => array( ‘Residential’ ),
‘slug’ => array( ‘residential’ ),
‘author’ => $userID,
‘pad_counts’ => false,
‘fields’ => ‘count’,
‘hide_empty’ => true,

// The Term Query
$term_query = new WP_Term_Query( $args );
echo ‘Residential Properties: ‘. $term->count;

Read more here:: Term count by user

Leave a Reply

Your email address will not be published. Required fields are marked *