get_the_title() can also be used to get the title for a specific post. This can be done by passing the ID to the post whose title you want: echo get_the_title( 123 ); single_post_title() , on the other hand, gets the title of the queried object.
get_the_title() can also be used to get the title for a specific post. This can be done by passing the ID to the post whose title you want: echo get_the_title( 123 ); single_post_title() , on the other hand, gets the title of the queried object.