Theme Configuration

Theme configuration allows you to make it easy for clients to customize their theme. 

Some example uses include:

  • Allow them to upload their own logo.
  • Enable clients to manage content in the header and footer that is usually hard-coded in HTML.
  • Allow customers to add their own social networking links.
  • Turn on or off certain UI elements.

As the theme developer, you have full control over what the fields are and how they are organized.

Configuration file

You set up the configuration in the theme.json file. The theme.json file will go inside the theme folder.  For example, if your theme's folder is called custom and themes is the name of the folder where themes are stored, then you would have the following directory/file structure:

themes
  custom
    template
    theme.json

Sample code

Below is an example showing all of the different configuration field types. This also shows how to organize fields in groups (tabs) as well as setting default values.