Adding or Including custom post type to default WordPress loop

Adding or Including custom post type to default WordPress loop by altering the ‘pre_get_posts’ function. Here it use add_action() function. This will help to display those posts (custom posts) alongside the default posts in the regular post feed.

Add this in you functions.php file