- Installation
- Demo Theme
- Frontend Libraries ↗
- Frontend Helpers ↗
- Configuration
- Configuration Options ↗
- Environment Detection
Custom Post Types & Taxonomy
- Name framework? Something short - 3 to 4 characters.
- Move Frontend Libraries and Helpers to their own Plugin?
- Add ACF customizations.
- Add Metatag Library.
- Write Product introduction.
Installation is very simple - install and activate this Plugin on your Wordpress site. Once running, most of the Frontend HTML and Dashboard UI cleanup functionality will happen automatically. If you would like to customize functionality within the framework refer to the Configuration section of this document.
If you are using any of the Template Libraries or Helper Functions in your theme code, we suggest placing the following in your code functions.php file to safeguard against errors if the event the Plugin is deactivated.
#functions.php // Make sure the Theme Framework plugin is present. Required by this theme. if (!is_admin() && !defined('HELLO_DIR')) exit('<strong>Whooops.</strong> This theme is meant to be used with the <a href="https://github.com/louiswalch/Wordpress-Theme-Framework">Theme Framework</a>. Please install and activate.');To familiarize yourself with developing Wordpress themes using this framework I recommend checking out our demo theme. This is a very light implementation showcasing most of the major features.
https://github.com/louiswalch/Wordpress-Theme-Framework-Demo
Customization and control over the functionality contained in the framework is done through configuration files you place in your theme. To manage the configuration of your theme, create a file at _framework/config.php with your desired options.
# _framework/config.php CONFIG()->set('frontend/assets/css', ['css/site.min.css']); CONFIG()->set('frontend/assets/css_print', ['css/print.min.css']); CONFIG()->set('frontend/assets/js', ['js/vendor.min.js', 'js/site.min.js']);In addition base level configuration file, you can also create environment-specific (development, staging) files which would override all default settings only on that environment.
# _framework/config_development.php CONFIG()->set('frontend/assets/css', ['css/site.css']); CONFIG()->set('frontend/assets/css_print', ['css/print.css']); CONFIG()->set('frontend/assets/js', ['js/vendor.js', 'js/site.js']);To inspect the current framework configuration you can use the following command.
<? pr(CONFIG()->dump(), 'Site Configuration'); ?>For a list of all available options that be configured through your theme's config.php file, refer to this list ↗.
By default, the framework is configured for the following organization. Most are optional based on what aspects of the system you are using. Paths relative to your theme root.
_framework/assets/Login, Dashboard & Editor CSS files.config_development.phpDevelopment site overrides.config_staging.phpStaging site overrides.config.phpYour custom framework configuration.metabox/Custom Metabox HTML.types/Custom post type declarations.
_includes/Files being used with Includes._modules/Blocks being used with Modules.assets/Theme CSS/JS/IMG/etc.
Based on the site url, the framework will detect the current environment (development, staging, production). This information is used for loading the appropriate configuration file and adding a CSS class to the BODY. The domain match string is defined in the base configuration file if you need to update it to match your infrastructure.
| Environment | Domain Match |
|---|---|
| Development | .local |
| Staging | staging. |
| Producton | * |
Not Yes.