Search WordPress Posts By Custom Term Name (Category/Tag/Any Taxonomy)

Copy this code to your theme’s functions.php and it will return posts in search result also by their category/tag name.