Single template file vs calling header.php/footer.php etc separately?
-
Hey all. Going to ask this here too as no one has been able to respond in the themes section.
I have what may be a no-brainer.
By default, the way WP themes are built is that there are separate header.php, sidebar.php, comments.php, footer.php etc files in a theme. And for good reason for lots of people.
However, does putting them all into one file and not loading them separately cause less stress on the webserver, as it them loads a single *.php file instead of 4-5 smaller every time a user visits a new page?
Less queries, less stress?
I may have totally misunderstood how this affects the under-the-hood of things, so wanted to asks someone who’s smarter at this than me.
Thanks.
- The topic ‘Single template file vs calling header.php/footer.php etc separately?’ is closed to new replies.