Viewing 1 post (of 1 total)
  • Author
    Posts
  • #40587
    gtafast
    Participant

    Hi there, I was reading thru some older posts from 2015 and saw you answered this back then, but my code was a bit different and wondering if it’s possible. I’m using WP_User_Query I can’t get the views to track from Author pages. Hopefully you can help me resolve. Love your plugin, btw!

    
    <?php
    $recent_interview_args = array(
        'number' => 5,
        'role' => 'Contributor',
        'meta_query' => array(
            array(
                'key' => 'profile_image'
            )
        )
    );
    
    $recent_interview_loop = new WP_User_Query($recent_interview_args);
    
    ?>
    <?php
    // User Loop
    if (!empty($recent_interview_loop->get_results())) : ?>
        <?php foreach ($recent_interview_loop->get_results() as $user) : ?>
            <?php echo pvc_post_views($post_id = 0, $echo = true); ?>
        <?php endforeach; ?>
    <?php endif; ?>
    <?php wp_reset_query(); ?>
    
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.