I added custom field post_views_count
to every post to track post view count, it works. But also I need to show all taxonomy categories orderby that most popular post view count, here is my code, but seems it is not working at all:
$args = array(
'hide_empty' => true,
'fields' => 'all',
'hierarchical' => true,
'child_of' => 0,
'get' => '',
'name__like' => '',
'pad_counts' => false,
'taxonomy' => 'video-category',
'cache_domain' => 'core',
'meta_key' => 'post_views_count',
'orderby' => 'meta_value_num',
);
$terms = get_terms('video-category', $args);