latest version

Theme

Theme files include all WordPress view templates, theme related functions, static assets, theme specific framework customizations including demo content settings, and plugin dependencies.

Note

Basic structure can be downloaded here: Theme boilerplate

Structure

themes/
├-projectname/
  ├-theme/
  │  │--vendor/                     # Commerial plugins zip files (if required by the theme)
  │  │--page-templates/
  │  │--languages/                  # Leave empty for autogenerated .pot file (create a .gitkeep file if needed)
  │  │--demo-content/               # Demo contents manifests and screenshots. The content itself should be autogenerated.
  │  │  │--example-multipager/
  │  │  │  │--manifest.php          # Demo content name, image, preview link
  │  │  │  │--screenshot.png
  │  │  │--example-onepager/
  │  │  │--...
  │  │--assets/                     # Static assets
  │  │  │--css/
  │  │  │  │--style.css
  │  │  │--sass/
  │  │  │  │--style.scss
  │  │  │  │--..
  │  │  │--javascripts/
  │  │  │--images/
  │  │  │--.../
  │  │--inc/
  │  │  │--includes/
  │  │  │  │--bee-plugins-check/    # Library to check if required plugins are active and render install instructions
  │  │  │  │--mocks/                # Functions mocking required plugins (such as Unyson) when not active
  │  │  │  │--tgmpa/                # Plugin dependencies library & settings
  │  │  │  │--sub-includes.php      # Includes files in this directory
  │  │  │--vendor/                  # Autoincluded settings for external vendors
  │  │  │  │--megamenu.php
  │  │  │  │--...
  │  │  │--helpers.php              # Theme functions
  │  │  │--hooks.php                # Theme related hooks
  │  │  │--init.php                 # Includes everything else
  │  │  │--menus.php                # Menus related settings
  │  │  │--posts.php                # Default post types & taxonomies options
  │  │  │--static.php               # Enqueue scripts and styles
  │  │--framework-customizations/
  │    │--extensions/
  │    │  │-─extension-name/
  │    │  │-─...
  │    │--theme/
  │      ├-manifest.php             # Theme id, supported extensions etc.
  │      ├-config.php               # Theme specific configuration
  │      └─options/
  │        ├─settings.php           # Theme settings panel
  │        ├─{settings_tab}.php     # Theme settings example tab
  │        ├─customizer.php         # Customizer options
  │        ├─...
  │--child-theme/
     │--framework-customizations/
       │--... # same as in then parent theme, but here you can overwrite specific files from the parent theme

Structure overview

theme/languages/
In this directory, there should be .pot translation files for the theme. These are autogenerated in the package build process. See Build for more information.
theme/demo-content
In this directory, there should be demo contents for each theme flavor or version (ie. onepager, multipager). They are autogenerated in the package build process. See Build for more information.
theme/vendor
If theme requires any plugins which are not free to download from WordPress.org repository, they should be available in the theme vendor directory as zip files so that once theme is activated customer can quickly install them via WP Admin. Note this is relevant to external plugins only (ex. Visual Composer or Revolution Slider). The Theme Plugin will be pulled and packed automatically in the package build process. See Build for more information.
theme/inc
This directory contains main theme functionality which is available to users without the Theme Plugin being active. When developing a theme, put all the basic functionality in here.

Note

Theme slug should be themename, ie. My Theme slug would be mytheme, see Coding Standards for more explanation

Here are sample information to be put in the main theme stylesheet

/*
Theme Name: Mytheme
Theme URI: https://createit.pl
Author: Create IT
Author URI: Create IT
Description: My Theme
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: My
Domain Path: /languages
*/