Add custom template ‘sub-page’ to Custom Post type?

If you are interested in using Plugin, and to add PHP code directly into your Elementor, try the following plugin which will enable to add PHP code directly into your Elementor pages.

https://wordpress.org/plugins/php-everywhere/