Code to  show related post without any plugin on wordpress pages or post

This Code will help you to  show related post without any plugin on wordpress pages or post.

You can use this code on page.php or single.php