numero de visitas no post
-
Ola, bom dia
eu queria implementar um codigo<?php if(functions_exists('the_views')) {the_views();} ?>
, para que ocorra uma contagem do numero de visitas de um post!
Não sei o lugar certo de por o código!
index.php<?php /** * The main template file. * * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists. * Learn more: http://codex.wordpress.org/Template_Hierarchy * * @package Able * @since Able 1.0 */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php if ( have_posts() ) : ?> <?php able_content_nav( 'nav-above' ); ?> <?php /* Start the Loop */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?> <?php endwhile; ?> <?php able_content_nav( 'nav-below' ); ?> <?php elseif ( current_user_can( 'edit_posts' ) ) : ?> <?php get_template_part( 'no-results', 'index' ); ?> <?php endif; ?> </div><!-- #content --> </div><!-- #primary .site-content --> <?php get_sidebar(); ?> <?php get_footer(); ?>
A visualizar 3 respostas - de 1 a 3 (de um total de 3)
A visualizar 3 respostas - de 1 a 3 (de um total de 3)
- O tópico ‘numero de visitas no post’ está fechado a novas respostas.