Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
My page ID is: 30601.
I want to get the page's title with ID.
Try with this:
<?php echo get_the_title( $ID ); ?>
echo get_the_title( get_the_ID() );
get_the_title fetch the title of WordPress post based on particular Id. and get_the_ID() fetch id of that page/post
Required, but never shown