Stack Exchange network consists of 183 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.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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