• <?php $myposts = get_posts(array(
    ‘post_type’ => ‘information’,’posts_per_page’=>20,
    ‘tax_query’ => array(
    array(
    ‘taxonomy’ => ‘product_categories’,
    ‘field’ => ‘term_id’,
    ‘terms’ => 31)
    ))
    );
    $count=1;
    foreach ($myposts as $mypost) { ?>
    <td><?php echo $count; ?></td>
    <td><?php echo $mypost->post_title; ?></td>
    <td><?php echo $mypost->post_date; ?></td>
    <td class=”text-center”><?php echo do_shortcode( ‘[post_view]’ ); ?></td>
    </tr>

    <?php $count++; }
    ?>

    Can anybody please tell me how to show the counter that is shown on the admin panel for every page on template using loop.

    https://ww.wp.xz.cn/plugins/baw-post-views-count/

The topic ‘Please help its urgent’ is closed to new replies.