WordPress theme for Hackney Works.
It makes heavy use of custom post types and taxonomies, particularly:
courses
, which can belong to curriculum areas and providers.intakes
, which belong to coursesvacancies
, which can belong to sectorsworkshops
, which can belong to sectorschecklist items
, which can belong to a coursetestimonials
, which can be added to courses and some pages
You need a Wordpress website up and running. Clone this repo into the wp-content/themes
folder.
Then, activate it through the WP admin dashboard.
It expects Advanced Custom Fields to be installed.
It has some pre-configured custom fields in inc/custom-fields.php
.
To make changes to JS and SCSS files you'll need to start up the Parcel bundler and Gulp:
npm i
npm run dev
It will watch for changes.
You can use moden JavaScript syntax (including JSX) and any imports supported by Parcel.
The theme includes several custom blocks for the WP editor.
They're defined in /src/js/blocks
and compiled into a second JS bundle that's included on the admin screens only.
Make sure that you run npm run build
to create production JS and SCSS before deploying it to a live site.
It's intended to be used with ACF's Google Map field. It needs a Google API key to be set. You can do it with a line like this in wp-config.php
:
define("GOOGLE_CLIENT_KEY", "your_api_key_here");
Make sure you add it above the /* That's all, stop editing. Happy blogging! */
line.
It looks for a JS environment variable SUBMIT_APPLICATION_ENDPOINT
which is the API host applications will be posted to.
You can provide this with a .env file if you like.
You can't provide JS config using PHP define()
statements.,
If you don't provide a value, it defaults to the Hackney Works staging site URL.