Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在24小时内显示浏览次数最多的分类法(Wordpress)_Php_Wordpress - Fatal编程技术网

Php 如何在24小时内显示浏览次数最多的分类法(Wordpress)

Php 如何在24小时内显示浏览次数最多的分类法(Wordpress),php,wordpress,Php,Wordpress,我想展示过去24小时内浏览次数最多的分类法 URL就像 在管理中: 现场: 当前正在使用此代码显示分类 <?php // taxonomies $id = get_the_ID(); foreach ( get_object_taxonomies( get_post_type($id) ) as $taxonomy ) { $terms_list = get_the_term_list( $id, $taxonomy, '', '<span class="tax-

我想展示过去24小时内浏览次数最多的分类法

URL就像 在管理中:

现场:

当前正在使用此代码显示分类

  <?php // taxonomies
  $id = get_the_ID();
  foreach ( get_object_taxonomies( get_post_type($id) ) as $taxonomy ) {
    $terms_list = get_the_term_list( $id, $taxonomy, '', '<span class="tax-sep">'.__( ',    ', 'twentytwelve' ).'</span>','' );
    if ( $terms_list ) 
     {
          echo $terms_list;
     }
    }
?>

不会跟踪分类法的视图数量。你可以买一个插件,比如-我从来没有用过它。或者,您可以构建自己的钩子来跟踪瞬态中的单个分类法


要记住的一件事是缓存,确保您没有使用非常硬的缓存,这样您就不会捕获所有跟踪数据。

大多数自定义帖子类型的浏览帖子

“meta_键”=>“视图”

:

Install it in your theme and use taxonomy code format and 

get most view taxonomy post  using