A modern WordPress starter theme which uses the WP Emerge framework.
This is the WP Emerge Theme project - for the WP Emerge framework please check out https://github.com/htmlburger/wpemerge.
- Documentation
- Development Team
- Comparison Table
- Features
- Requirements
- Directory structure
- Contributing
Brought to you by Atanas Angelov and the lovely folks at htmlBurger.
WP Emerge Theme | Sage | Timber | |
---|---|---|---|
View Engine | PHP, Blade, Twig | PHP, Blade | Twig |
Routing | โ | โ | โ |
MVC | โโโ | โโโยน | โโโ |
Middleware | โ | โ | โ |
View Composers | โ | โ/โยฒ | โ |
Service Container | โ | โ | โ |
Stylesheets | SASS + PostCSS | SASS + PostCSS | N/Aยณ |
JavaScript | ES6 | ES6 | N/Aยณ |
ยน Sage's Controller is more a View Model than a Controller.
ยฒ Sage's Controller provides similar functionality but is limited to 1 composer (controller) per view and vice versa.
ยณ Timber does not provide a front-end build process so you can implement whatever you prefer.
Email any factual inaccuracies to atanas.angelov.dev@gmail.com so they can be corrected.
- All features from WP Emerge:
- SASS + PostCSS for stylesheets. Separate bundles are created for front-end, administration and login pages.
- ES6 for JavaScript. Separate bundles are created for front-end, administration and login pages.
- Webpack to transpile and bundle assets, create sprites, optimize images etc.
- Browsersync for synchronized browser development.
- Optional CSS packages:
- Boostrap 4
- Bulma
- Foundation
- Tachyons
- FontAwesome
- PHP unit testing scaffolding
wp-content/themes/your-theme
โโโ app/
โ โโโ helpers/ # Helper files, add your own here as well
โ โโโ setup/ # Register WordPress menus, post types etc.
โ โ โโโ menus.php
โ โ โโโ post-types.php
โ โ โโโ sidebars.php
โ โ โโโ taxonomies.php
โ โ โโโ theme-support.php
โ โ โโโ widgets.php
โ โโโ src/ # PSR-4 autoloaded classes
โ โ โโโ Controllers/ # Controller classes for WP Emerge routes
โ โ โโโ Widgets/ # Widget classes
โ โ โโโ ...
โ โโโ config.php # WP Emerge configuration
โ โโโ helpers.php # Require your helper files here
โ โโโ hooks.php # Register your actions and filters here
โ โโโ framework.php # Register your WP Emerge routes, globals etc.
โโโ dist/ # Bundles, optimized images etc.
โโโ languages/ # Language files
โโโ resources/
โ โโโ build/ # Build process configuration
โ โโโ styles/
โ โ โโโ admin/ # Administration styles
โ โ โโโ login/ # Login styles
โ โ โโโ index.scss # Front-end entry point SCSS file
โ โโโ fonts/
โ โโโ images/
โ โโโ scripts/
โ โ โโโ admin/ # Administration scipts
โ โ โโโ login/ # Login scripts
โ โโโ index.js # Front-end entry point JavaScript file
โโโ theme/ # Required theme files and views
โ โโโ partials/ # View partials
โ โโโ templates/ # Page templates
โ โโโ functions.php # Bootstrap theme
โ โโโ screenshot.png # Theme screenshot
โ โโโ style.css # Theme stylesheet (avoid adding css here)
โ โโโ [index.php ...]
โโโ vendor/ # Composer packages
โโโ README.md # Your theme README
โโโ ...
Add PHP helper files here. Helper files should include function definitions only. See below for information on where to put actions, filters, classes etc.
Modify files here according to your needs. These files should contain registrations and declarations of WordPress entities only such as post types, taxonomies etc.
Add PHP class files here. All clases in the App\
namespace are autoloaded according to the PSR-4 standard.
Add .css and .scss files here. Don't forget to @import
them in index.scss
. Note that you are not requird to use SASS at all if you do not wish to do so, the only requirement is that index.scss
file remains with an .scss extension.
These directories are for the admin and login bundles, respectively. They work identically to the main resources/css
directory.
Add images for styling here. Optimized copies will be placed in dist/images/
when running the build process.
Add JavaScript files here. The entry point is resources/scripts/index.js
.
These directories are for the admin and login bundles, respectively. They work identically to the main resources/scripts
directory.
Add views in this, the theme/partials/
or the theme/templates/
directories accordingly. Avoid adding any PHP logic here, unless it pertains to layouting (PHP logic should go into helper files or WP Emerge controllers)
WP Emerge Theme is completely open source and we encourage everybody to participate by:
- โญ the project on GitHub (https://github.com/htmlburger/wpemerge-theme)
- Posting bug reports (https://github.com/htmlburger/wpemerge-theme/issues)
- (Emailing security issues to atanas.angelov.dev@gmail.com instead)
- Posting feature suggestions (https://github.com/htmlburger/wpemerge-theme/issues)
- Posting and/or answering questions (https://github.com/htmlburger/wpemerge-theme/issues)
- Submitting pull requests (https://github.com/htmlburger/wpemerge-theme/pulls)
- Sharing your excitement about WP Emerge with your community