Vishmax.com
Read

Get title of WordPress post outside the loop

We design and develop websites, digital experiences, and software solutions for growing businesses.

Adding below code to your WordPress theme will display the post title outside the loop.

 
<?php 
   global $post;
   if (is_single()) {
       the_title();
   }
?>