I am making an attempt to write my own theme for wordpress and have written a file that contains all my modals (twitter bootstrap), which are html. I added that to the theme sec
If you make use of get_template_part()
you shoudn't have any issues.
The way you probably included your modals.php was probably calling wp_footer()
for some reason.
so if you wanna use this template you just need to call it within the respective file you want it to.
header.php
single.php
footer.php
Are such template default files. Within one of those just call it.
Other than that i don't think their should be an issue it not working.
Tell me if it fixes your issues, maybe paste the code context where the modals.php
is being called and how its being called.