Need help in the process of creating your own WordPress 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
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
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
*/