WordPress获取当前文章ID标签:the_ID - 利剑分享-科技生活-利剑分享-科技生活
利剑分享-科技生活-利剑分享-科技生活
利剑分享-科技生活

WordPress获取当前文章ID标签:the_ID

WordPress获取当前文章ID标签:the_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()

© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'uos_print_tracking_script' not found or invalid function name in /www/wwwroot/flybace.com/wp-includes/class-wp-hook.php on line 324