WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any particular reason why index.php in most templates usually seems to go all the way from just after the start of #main to right before it's closing tag, with that closing tag contained in footer.php. In my theme it would be handy to have #main's closing tag in the index/single/page files not in footer.php ( so the split would be another couple of lines down the code from where i normally see it ).

And if there's no real difference then should i also move the header/index split up a line to get the #main div start tag into the index/single/page etc files ?

share|improve this question
up vote 1 down vote accepted

It's a personal choice. If the containing markup is consistent across all templates it doesn't matter if they're in the template or header/footer, it's just one less bit of markup that gets repeated in every template.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.