• Hi guys, I’m using this snippet to show the number of visits and the number of comments in each post

    add_action( 'generate_post_meta_items', function( $item ) {
    if ( 'view-counter' === $item ) {
    echo ' - ';
    echo ' ' . the_views() . '';
    }
    } );

    add_filter( 'generate_header_entry_meta_items', function() {
    return array(
    // 'author',
    'date',
    'view-counter',
    // 'comments-link',
    );
    } );

    How can I obtain the same results also on each page?

    And how can I, now, hidden this result in some particular page (i.e. the home page)?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show #visits and #comments’ is closed to new replies.