1. Home
  2. Docs
  3. WordPress Developer
  4. WordPress Theme Development
  5. Organizing Theme Files

Organizing Theme Files

While WordPress themes technically only require two files (index.php and style.css), they usually are made up of many files

Theme folder and file structure

Below one of the good theme development Structure

assets (dir)

     – css (dir)

     – images (dir)

     – js (dir)

inc (dir)

template-parts (dir)

     – footer (dir)

     – header (dir)

     – navigation (dir)

     – page (dir)

     – post (dir)



  • JavaScript, CSS, images are placed in assets directory
  • Main theme template files are in the root directory
  • Template-parts are placed in under respective subdirectory of template-parts and
  • Collection of  functions related to core functionalities are placed in inc directory.
  • It’s best practice to internationalize your theme so it can be translated into other languages. For that include the languages folder, which contains a .pot file for translation and any translated .mo files.
Was this article helpful to you? Yes No

How can we help?