ID; } xtempt_set_post_views($post_id); } add_action( 'wp_head', 'xtempt_track_post_views'); function xtempt_popular_posts_views() { $popularpost = new WP_Query( array( 'posts_per_page' => 20, 'meta_key' => 'wpb_post_views_count', 'orderby' => 'wpb_post_views_count', 'order' => 'DESC' ) ); while ( $popularpost->have_posts() ) : $popularpost->the_post(); ?>
false, 'ignore_sticky_posts' => 1, 'orderby' => 'comment_count', 'numberposts' => 10) ); ?>