Chèn lượt view vào bài viết

Chèn code vào functions.php

function rating_after_date($date, $d, $post_id)
{
    return $date . printf(' | Ratings: %s'
                 ,get_post_meta( get_the_ID(), 'post_rating', true )
);

add_action( 'get_the_date', 'rating_after_date' );

Leave a Reply

Your email address will not be published. Required fields are marked *