Get title of a post in WordPress

get_the_title($ID); is used to get a title of a post in WordPress. This method can take in an integer argument where you can specifiy the Post ID or you can leave it empty to use the current post in the loop.

{code type=php}

<?php echo get_the_title($ID); ?> //uses post id

<?php echo get_the_title(); ?> // uses current post

{/code}