the_ID

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

Description

the_ID(); 

Usage

  1. if ( !function_exists( 'the_ID' ) ) { 
  2. require_once ABSPATH . WPINC . '/post-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = the_ID(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/post-template.php  
  1. function the_ID() { 
  2. echo get_the_ID();