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
https://docs.theme.wpemerge.com/
https://docs.theme.wpemerge.com/quickstart.html
Brought to you by Atanas Angelov and the lovely folks at htmlBurger.
WP Emerge Theme | Sage | Timber | |
---|---|---|---|
View Engine | PHP, Blade, Twig, any | Blade | Twig |
Routing | β | β | β |
MVC | βββ | βββΒΉ | βββ |
Middleware | β | β | β |
View Composers | β | β/βΒ² | β |
Service Container | β | β | β |
Stylesheets | SASS + PostCSS | SASS + PostCSS | N/AΒ³ |
JavaScript | ES6 | ES6 | N/AΒ³ |
Front end, Admin, Editor and Login Bundles | β | β | N/AΒ³ |
Automatic Sprite Generation | β | β | N/AΒ³ |
Cache Breaker | β | β | β |
WPCS Linting | β | β | β |
Advanced Error Reporting | β | β | β |
WP Unit Tests for your classes | β | β | β |
ΒΉ Sage's Controller is more of a View Composer 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 [email protected] so they can be corrected.
- All features from WP Emerge:
- Gutenberg support.
- SASS + PostCSS for stylesheets. Separate bundles are created for front-end, administration, Gutenberg and login pages.
- ES6 for JavaScript. Separate bundles are created for front-end, administration, Gutenberg and login pages.
- Webpack to transpile and bundle assets, create sprites, optimize images etc.
- Browsersync for synchronized browser development.
- Autoloading for all classes in your
App\
namespace. - Automatic, fool-proof style and script cache breaker.
- WPCS, JavaScript and SASS linting using single yarn commands.
- Single-command optional CSS package installation:
- Normalize.css
- Boostrap 4
- Bulma
- Foundation
- Tachyons
- Tailwind CSS
- FontAwesome
- WP Unit Test scaffolding for your own classes.
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.
β βββ fonts/
β βββ images/
β βββ scripts/
β β βββ admin/ # Administration scripts.
β β βββ editor/ # Gutenberg editor scripts.
β β βββ login/ # Login scripts.
β β βββ theme/ # Front-end scripts.
β βββ styles/
β β βββ admin/ # Administration styles.
β β βββ editor/ # Gutenberg editor styles.
β β βββ login/ # Login styles.
β β βββ shared/ # Shared styles.
β β βββ theme/ # Front-end styles.
β βββ vendor/ # Any third-party, non-npm assets.
βββ 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 in accordance with the PSR-4 standard.
Add images for styling here. Optimized copies will be placed in dist/images/
when running the build process.
Add .css and .scss files to add them to the front-end bundle. Don't forget to @import
them in index.scss
.
These directories are for the admin, editor and login bundles, respectively. They work identically to the main resources/styles/theme/
directory.
Add JavaScript files here to add them to the front-end bundle. The entry point is index.js
.
These directories are for the admin, editor and login bundles, respectively. They work identically to the main resources/scripts/theme/
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 [email protected] 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