Neve主题,使用 WP-Postviews 显示浏览次数
diff --git a/tmp/post_meta.php b/inc/views/partials/post_meta.php
index 78a3e59..a668bb7 100644
--- a/tmp/post_meta.php
+++ b/inc/views/partials/post_meta.php
@@ -166,6 +166,7 @@ class Post_Meta extends Base_View {
}
$index ++;
}
+ if(function_exists('the_views')) { $markup .= '<' . $tag . ' class="meta views">' . the_views(false) . '</' . $tag . '>';}
$markup .= $as_list === true ? '</ul>' : '</span>';
echo ( $markup ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
效果:
|