i
1,安装插件WP-PostViews 并启用
2,查看浏览插件和对应的php 函数
3,修改wordpress 的配置文件引用 php函数 the_view() ,注意引用生效必须是在php代码里面
Ashe: blog-list.php (templates/grid/blog-list.php)
<span class=”meta-sep”>/</span>
<span class=”post-date”><?php the_time( get_option( ‘date_format’ ) ); ?></span>
<?php endif; ?>
<?php the_views(); ?>
<?php if ( ashe_options( ‘blog_page_show_comments’ ) === true && comments_open() ) : ?>
4,修改 Ashe: post-content.php (templates/single/post-content.php)文件
<?php comments_popup_link( esc_html__( ‘0 Comments’, ‘ashe’ ), esc_html__( ‘1 Comment’, ‘ashe’ ), ‘% ‘. esc_html__( ‘Comments’, ‘ashe’ ), ‘post-comments’); ?>
<?php endif; ?>
<?php the_views(); ?>
</div>
<?php endif; ?>
更新文件后即可!
0 条评论