Display Wordpress post ID in functions.php

kumkumsharma

Administrator
Staff member
You can use the the_ID() function to check the post ID if you will add this function within the loop then it will display the current numeric ID of post.

Here is the example of the post:

Code:
Post Number: <?php the_ID(); ?>
 
Top