Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEfi Minzer
37 PointsIs there a way to embed the modal box not in the footer? maybe in functions.php? what the best practice?
How to add the modal box the wright way? so that I will be able to use it everywhere on the website, and with all kinds of content inside?
1 Answer
Craig Watson
27,930 PointsHi,
May be you could try using the
<?php get_template_part('modal', 'contact'); ?>
and have a file named " modal-contact.php "
and then if you have other modals you would like to use just make other template files and the get template part function with corresponding file name :)
Craig