Support » Themes and Templates » Do i need a header.php / footer.php

  • Resolved CharlieWaffles


    Is there any real need to create a separate header.php / footer.php when making an own wordpress theme, or can i leave all markup in the index.php?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    That is really a great question. It means you are progressing in theme concept 🙂

    Well, I think we need those files really. Because, when page.php file called in wp theme, index.php file may not be called. So at that time, footer.php may be required.

    Correct me if i am wrong.

    Thank you,

    ok, didnt think about this issue.

    You don’t explicitly need to separate them out but you would need to make sure that all template files have the proper header and footer code in them. That would mean essentially duplicating work for at least index.php, single.php, page.php, and search.php (not to mention any custom template files). Personally, I think it’s much easier to separate them out and then call get_header() and get_footer().

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Do i need a header.php / footer.php’ is closed to new replies.