WordPress.org

Forums

Customizr
Try inserting add_filter into tc_post _metas (1 post)

  1. afjsystem
    Member
    Posted 1 year ago #

    hi..again.
    i tried to inserting this codes to functions.php (child) :

    <?php add_filter('tc_post_metas', 'content_views_metas');
     function content_views_metas($content) {
    	$count = getPostViews( get_the_ID() );
        if ( ! is_numeric( $count ) )
            $count = ''; // prevent errors showing to visitors
        else
            $count = "<p class='view-count'>Views: $count</p>";
        return $content . $count;
    }
    ?>

    but no luck. I need to get views count appear inline with the category and tags below the tittle. (after the author and with button)

    Please anyone can help ?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic