How to get page title with the page ID?
Frage
My page ID is: 30601
.
I want to get the page's title with ID.
Lösung
Try with this:
<?php echo get_the_title( $ID ); ?>
Andere Tipps
<?php
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
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit wordpress.stackexchange