What is get_template_part() good for?
-
Hi,
I have a problem understanding the function get_template_part();
This will include my file ‘page-header.php’ which is in the sub folder ‘templates’:
get_template_part('templates/page', 'header');
What are these two parameters used for? Why can’t I use it simply like that:
get_template_part('templates/page-header.php');
?Or even better, I could use require_once(); … so what is basically the difference?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘What is get_template_part() good for?’ is closed to new replies.