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

admin 2017年4月3日00:14:20WordPress技巧评论2,345 次浏览阅读模式

<?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
我的微信
微信扫一扫
admin
  • 本文由 发表于 2017年4月3日00:14:20
  • 转载请务必保留本文链接:https://anyun.org/a/webtips/wordpressjiqiao/2017/0403/8634.html

发表评论

匿名网友 填写信息

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