Phone stuck on boot screen after root and recovery - HTC One M8
Are you sure you are on the latest compatible baseband of your phone? Sometimes the newer builds of TWRP won't boot on old firmwares. Try updating that first.

And since you have access to your bootloader, you can install recovery and start over with a different ROM (make sure to verify your checksums manually).