Post view not showing – Postviews plugin
-
I have added this code
`<?php
add_action( ‘generate_after_post_meta’, ‘tu_post_views’, 15 );
function tu_post_views() {
if ( is_single() ) {
echo do_shortcode( ‘[post-views]’ );
}
}?> `to my content-single.php file but nothing is showing. See what I am trying to achieve here.
See more of the codes below, my breadrumb was set to display before post_meta
<?php /** * generate_before_entry_post_meta. * * @since 0.1 */ do_action( 'generate_before_post_meta' );?> <div class="breadcrumbs" typeof="BreadcrumbList" vocab="http://schema.org/"> <?php if(function_exists('bcn_display')) { bcn_display(); }?> </div> <?php /** * generate_after_entry_title hook. * * @since 0.1 * * @hooked generate_post_meta - 10 */ do_action( 'generate_after_entry_title' ); ?> <?php add_action( 'generate_after_post_meta', 'tu_post_views', 15 ); function tu_post_views() { if ( is_single() ) { echo do_shortcode( '[post-views]' ); } }?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Post view not showing – Postviews plugin’ is closed to new replies.
