-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This template repo is a boilerplate set of files for WordPress child themes, for use in projects created by UCF Communications and Marketing (specifically, UCF Web Communications/Webcom). It includes an opinionated set of build tool and linter configurations for rapid development of minified, optimized theme assets that follow our team's code standards.
The provided files assume the UCF WordPress Theme is the parent theme, but this can be modified as needed.
To ensure our projects are created with the latest configurations and README information, CM devs should create new child theme projects from this repo. Use the guide below to get started:
-
Pull down your new repo into your local development environment.
-
Replace
{{My-Project}}
and{{My Project}}
placeholders throughout the template files.{{My-Project}}
corresponds to the the slug of your project on Github, e.g.Main-Site-Theme
.{{My Project}}
should be replaced with the human-friendly name of your project, e.g.Main Site Theme
.You can perform a couple of project-wide find+replace commands in your IDE/editor to do this quickly.
-
In
includes/config.php
andincludes/meta.php
, update theMYPROJECT_
constant prefixes to use a prefix that's unique and appropriate for your project, e.g.MAINSITE_
. -
In
includes/meta.php
, update themyproject_
prefix used in the functions provided in the file to use a prefix that's unique and appropriate for your project, e.g.mainsite_
. Remember to also update references to functions used in action/filter hooks!
That's it! From here, continue developing your theme as you would normally. Remember to fill in the remaining placeholder information for your project in the README, CONTRIBUTING doc, and other files! (You can do a project-wide search for {{
to locate all of these placeholders.)
In addition to setting up your new project on Github using these files, remember to also do the following for all new projects. Some parts of our project documentation depend on the following existing:
- Set up a project wiki for hosting documentation.
Projects generated using these template files assume the following:
- The child theme assumes the UCF WordPress Theme is the parent theme.
- The child theme's generated stylesheet and javascript files are enqueued for you (see
includes/meta.php
). They are enqueued with UCF WordPress Theme assets listed as dependencies to ensure assets are loaded in the correct order. If your child theme requires extra stylesheets or scripts, you'll need to enqueue them yourself in this file. - Minified css and js will be saved to
static/
. - The Athena Framework's variables and mixins are imported into the main theme Sass file. The child theme assumes the UCF WordPress Theme's stylesheet gets loaded in, which includes the Athena Framework, so including the entire framework in the child theme is unnecessary.
-
style.css
is NOT a registered stylesheet, in favor ofstatic/css/style.min.css
. - If ACF is a required plugin, its field config should be saved to
dev/acf-config.json
.