Skip to content
alex_prokopenko edited this page Jan 9, 2018 · 11 revisions

WordPress Boilerplate Theme with a modern structure by JustCoded

Boilerplate Theme is a WordPress starter theme, which can be used for rapid development start. It's highly recommended for big projects (several unique templates, long-scroll landing pages, Custom Post Types and custom queries).

This theme doesn't work without a plugin WordPress Theme Framework. Theme Framework consists a base code, which can be used to create your very own theme.

Better file structure

The organization of a theme is very similar to a modern PHP Frameworks. We totally separated registration of hooks and components, query logic and the templates.

File structure

OOP, Autoload

Main code is written with classes, using best practices of inheritance and incapsulation. Autoload technique helps to load only classes we need for particular page (faster loading).

Folders structure helps to quickly find the small peace of code you need to write or update.

Improved Template Structure

All templates are now grouped by post type (like page or post) or by section (like search). When you develop a big site with lot of custom templates it's extremely useful to find the correct template.

Furthermore, folders grouping does not break standard WordPress Template Hierarchy. You can use all the same template names as you usually do. Just place them in folder! (Actually if you don't use views folder with sections grouping - standard template location works as well).

Theme Wrapper

Based on "Theme Wrapper" technique we made template inheritance system. Markup is handled by one file (or more if needed) instead of being scattered across all template files like typical themes. Stay DRY!


Next: Installation