get_the_id()

- Description : Retrieve the ID of the current item in the WordPress Loop. (반환 함수)

- URL : WordPress.org | Code Reference : https://developer.wordpress.org/reference/functions/get_the_id/

- Ex :

$page_id = intval(get_the_id());

if( get_the_id() == '14195' ) {
	//your code
}




the_ID()

 - Description : Display the ID of the current item in the WordPress Loop. (출력 함수)

   Displays the numeric ID of the current post. This tag must be within The Loop.

   Note : This function displays the ID of the post, to return the ID use get_the_ID().

 - URL : WordPress.org | Code Reference : https://developer.wordpress.org/reference/functions/the_id/

function the_ID() {
    echo get_the_ID();
}


- Usage :


Post Number:



get_current_blog_id()

 - Description : Retrieve the current site ID. / Retrieve the current blog id. (멀티사이트에서 현재 사이트의 아이디값을 반환)
 - URL : WordPress.org | Code Reference : https://developer.wordpress.org/reference/functions/get_current_blog_id/
 - URL : WordPress.org | Codex : https://codex.wordpress.org/Function_Reference/get_current_blog_id
- Usage :


$blog_id = get_current_blog_id();


Posted by cpu21