the_ID()

WordPress获取当前文章ID函数

WordPress模板函数the_ID用于输出当前文章的ID,需要用在The Loop主循环里。

the_ID()

使用示例:

<p>文章ID: <?php the_ID(); ?></p>

扩展阅读

the_ID()函数位于:wp-includes/post-template.php

相关函数:

get_the_ID()
the_title()
the_title_attribute()

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索