The main theme, designed to be used across all Science Squared properties is a child theme, based on Kadence.

Site Switcher variables

To accommodate assorted branding, a few variables must be defined in wp-config, like so:

define( 'BRAND_SWITCHER', 'bsb' );

The options currently configured are:

  • bsb – The new design for bitesize bio
  • classic – an approximation of the old design, for use during the transition phase
  • mf – This will be used to replace the current Microscopy Focus theme
  • bionic – For use on this style guide

A further variable is required for certain sites

define( 'SITE_SWITCHER', 'resources');

This enables the resource custom post type, meaning it can remain switched off for all other sites.

Uses

There are three areas of the theme which check for these values and load the correct content accordingly

  • A function in functions.php loads the correct css, fonts and javascript, based on the choice
  • template-parts\header\header-row.php – will load the appropriate header
  • template-parts\footer\footer-html.php – loads the appropriate footer