the_id

函数


the_id ( No parameters )
定义位置
  • wp-includes/post-template.php
    , line 16
引入
0.71
弃用

Displays the ID of the current item in the WordPress Loop.

function the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
	echo get_the_ID();
}