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 trial

WordPress WordPress Theme Development WordPress Header and Footer Templates The header.php and footer.php Files

melissa brown
melissa brown
4,670 Points

include function instead of get function

Why cant we use the include header function instead of get? What is the difference between the two? <?php include(inc/header.php');?>

2 Answers

Andrew Cato
Andrew Cato
4,263 Points

get_header is a function specific to WordPress, whereas include is a vanilla PHP statement - it's not that you can't use include - it's just recommended to use the WordPress functions where applicable.