wordpress获取阅读量/评论量/时间/作者等

  • A+
所属分类:WordPress技巧

<?php

echo '<table ><tbody>';

echo '<tr><td width="15%" class="article-en-title"><strong>本文标题:</strong></td><td width="55%" class="article-en-title-context">'.get_the_title().'</tr>';

echo '<tr><td width="15%" class="article-en-title"><strong>作者:</strong></td><td width="55%" class="article-en-title-context">'.get_the_author().'

<td width="15%" class="article-en-title"><strong>发表时间:</strong></td><td width="55%" class="article-en-title-context">'.get_the_time('Y-m-d').'</tr>';

//echo '<tr><td width="15%" class="article-en-title"><strong>发表时间:</strong></td><td width="55%" class="article-en-title-context">'.get_the_time('Y-m-d').'</tr>';

echo '<tr><td width="15%" class="article-en-title"><strong>阅读数量:</strong></td><td width="55%" class="article-en-title-context">'. _get_post_views().'

<td width="15%" class="article-en-title"><strong>评论数量:</strong></td><td width="55%" class="article-en-title-context">'._get_post_comments().'</tr>';

//echo '<tr><td width="15%" class="article-en-title"><strong>评论数量:</strong></td><td width="55%" class="article-en-title-context">'._get_post_comments().'</tr>';

echo '<tr><td width="15%" class="article-en-title">English Title:</td><td width="55%" class="article-en-title-context">'.get_field('en_title').'</tr>';

echo '</tbody></table>';

?>

<?php

echo '<table ><tbody>';

echo '<tr><td width="15%" class="article-en-title"><strong>本文标题:</strong></td><td width="55%" class="article-en-title-context">'.get_the_title().'</tr>';

echo '<tr><td width="15%" class="article-en-title"><strong>作者:</strong></td><td width="55%" class="article-en-title-context">'.get_the_author().'</tr>';

//echo '<tr><td width="15%" class="article-en-title"><strong>发表时间:</strong></td><td width="55%" class="article-en-title-context">'.get_the_time('Y-m-d').'</tr>';

//echo '<tr><td width="15%" class="article-en-title"><strong>阅读数量:</strong></td><td width="55%" class="article-en-title-context">'. _get_post_views().'</tr>';

//echo '<tr><td width="15%" class="article-en-title"><strong>评论数量:</strong></td><td width="55%" class="article-en-title-context">'._get_post_comments().'</tr>';

echo '<tr><td width="15%" class="article-en-title">English Title:</td><td width="55%" class="article-en-title-context">'.get_field('en_title').'</tr>';

echo '<tr><td width="15%" class="article-en-title">本文章链接:</td><td width="55%" class="article-en-title-context">'.get_permalink().'</tr>';

echo '</tbody></table>';

?>

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: