Overview#
Flow is a website for an independent yoga studio, built as a WordPress block theme. The fictional brand is Salt &
Sage Yoga, a small studio above the harbor in Santa Cruz, California, with four teachers, two rooms and thirty
classes a week. The theme has a home page that lists today's classes from the weekly schedule and shows the next
class in the hero, a schedule page with filters, "On now" and "Up next" markers and mat-by-mat booking saved under
My bookings, a class styles page with a level guide, teacher profiles, a pricing page with an intro-offer
calculator, workshops and retreats with a booking inquiry form, a beginners' guide with a searchable FAQ, a contact
page and a 404 page. It is version 1.0.1 (see template.json and style.css), works with WordPress 7.1 and PHP
7.4 or newer, and is the WordPress version of the HTML template of the same name. See it live at
freeframe.dev/templates/flow.
Headings, copy, cards, lists, buttons and images are core WordPress blocks arranged in block patterns, so you edit
them in the block editor without touching code. The interactive parts (today's classes, the schedule and its
filters, the mat picker, My bookings, the calculator, the workshop filter, the FAQ search and the forms) work as in
the HTML version: they are small Custom HTML blocks driven by assets/js/main.js. Colors and fonts are design
tokens in theme.json: change them in Appearance > Editor > Styles and the whole site follows.
Classes are described as general movement and relaxation, not medical treatment. Review the health notes with a qualified professional before publishing your own site.
Quick start#
Requirements: WordPress 7.1 or newer and PHP 7.4 or newer. No plugins are needed.
- Download
flow.zipfrom freeframe.dev/templates/flow (the WordPress tab). - In your WordPress admin go to Appearance > Themes > Add New Theme > Upload Theme, choose the zip and click Install Now, then Activate. The theme is listed as Freeframe Flow.
- Go to Appearance > Flow setup and click Create the demo pages. This creates the Home, Schedule & Booking, Class Styles & Levels, Our Teachers, Prices & Intro Offer, Workshops & Retreats, Beginners' Guide & FAQ and Contact & Find Us pages from the theme's page patterns, sets Home as the front page (Settings > Reading) and creates the header menu. Pages that already exist with the same slug are left alone, so it is safe to click it again.
- Set the site title and tagline in Settings > General (the demo uses "Salt & Sage Yoga" and "Yoga Studio in Santa Cruz, California"), then visit your site. Edit any page in Pages, and the header, footer and templates in Appearance > Editor.
You can also try the theme without installing anything: the Try it in WordPress button on freeframe.dev opens it in WordPress Playground (WordPress running in your browser) with the demo pages already set up.
To work on the theme's files locally you need Node.js 24 and pnpm; WordPress itself runs in WordPress Playground, so there is no PHP, web server or database to install:
pnpm install
pnpm dev # builds the CSS, then starts WordPress with the theme at http://127.0.0.1:9400pnpm dev signs you in as admin (password password) and creates the demo pages. The site is rebuilt from
scratch every time you start it; your edits to theme files are live, edits made in the WordPress admin are not kept.
Pages#
Each page is a page pattern (in Patterns > Flow pages) made of section patterns. Every section is also offered on its own in the block inserter under Patterns > Flow.
| Page | Slug | Page pattern | Sections (pattern files in patterns/) |
|---|---|---|---|
| Home | / |
page-home.php |
home-hero (harbor illustration and the next-class card), today (today's classes and how booking works), class-styles-preview, intro-offer, teachers-preview, voices (testimonials), workshops-preview, booking-dialog (the mat picker) |
| Schedule & Booking | /timetable/ |
page-timetable.php |
schedule-hero (with the studio's time), my-bookings, schedule (filters, the week, the empty state and three notes), booking-dialog |
| Class Styles & Levels | /classes/ |
page-classes.php |
classes-hero (links to each style), class-styles (seven styles), level-guide |
| Our Teachers | /teachers/ |
page-teachers.php |
teachers-hero, teachers-list (four profiles), teach-with-us |
| Prices & Intro Offer | /pricing/ |
page-pricing.php |
pricing-hero, intro-weeks, class-passes, memberships, calculator, small-print (four questions) |
| Workshops & Retreats | /workshops/ |
page-workshops.php |
workshops-hero, upcoming-events (kind filter and six cards), booking-inquiry (form) |
| Beginners' Guide & FAQ | /guide/ |
page-guide.php |
guide-hero, first-steps (five steps, what to bring, a word on health), faq (search and fifteen questions) |
| Contact & Find Us | /contact/ |
page-contact.php |
contact-hero, visit (map, address, opening times, getting here), message (form) |
| 404 | any missing URL | templates/404.html |
404 |
Posts use templates/single.html; the blog, archives and search results use templates/index.html,
templates/archive.html and templates/search.html. For a plain text page (a privacy policy, for example) choose
the Page with title template.
The booking-dialog section is the window that opens from every "Reserve a mat" button. A page that lists classes
(the home page and the schedule) needs it once; it shows nothing until a button opens it.
Project structure#
freeframe-flow/
style.css theme header (name, version, requirements, license); no styles
theme.json design tokens: palette, fonts, spacing, layout widths, button
functions.php loads the files in inc/
inc/setup.php stylesheet and script (with its strings and page URLs), editor styles, the `js`
class script, theme color and favicon, browser titles, the filters that write
blocks with the HTML version's attributes and elements, pattern categories
inc/icons.php registers assets/icons/*.svg for the Icon block
inc/icon-labels.php the icons' names shown in the editor
inc/block-styles.php button block styles
inc/site-setup.php Appearance > Flow setup: creates the demo pages and the menu
templates/ page.html (pages), page-with-title.html, single.html, index.html, archive.html,
search.html, 404.html
parts/ header.html and footer.html (they show the header and footer patterns)
patterns/ every section and page (PHP files with block markup)
assets/css/theme.css the compiled stylesheet (do not edit: built from src/)
assets/css/editor.css the same for the block editor (generated by src/editor-css.mjs)
assets/js/main.js studio data, the schedule, booking, the calculator, workshops, FAQ search, forms
assets/icons/ SVG icons for the Icon block
assets/img/ line drawings, teacher portraits, map, logo, favicon, social image
assets/fonts/ EB Garamond and Mulish, with their licenses
src/theme.css the Tailwind CSS source of assets/css/theme.css
src/icons.css icons drawn before or after text with CSS (generated)
src/editor-css.mjs writes assets/css/editor.css after each build
languages/ freeframe-flow.pot, the template for translations
blueprint.json WordPress Playground setup used by `pnpm dev`
screenshot.png the picture shown in Appearance > Themes
package.json the CSS build and the local WordPress (Node.js tooling)
readme.txt, README.md, DOCS.md, CHANGELOG.md, LICENSE.txtCustomizing#
Brand and colors#
The colors are in theme.json (settings.color.palette) and in Appearance > Editor > Styles > Colors >
Palette:
| Color | Default | Used for |
|---|---|---|
| Sand, Shell, Dune, Drift, Line | #f4ede2, #fbf8f2, #ebe0cd, #dccbb0, #ddd0bb |
the page background, cards and inputs, soft panels, deeper panels, borders |
| Sea 50 to 900 | #eef4f2 to #1a3431 |
the brand color: buttons and links (700), the dark bands and the footer (900) |
| Clay 100 to 700 | #f5e3d7 to #85462b |
warm accent: italic words, "On now", best-value bars |
| Sage 100 to 700 | #e5e9de to #46533c |
level dots, check marks and leaves |
| Ink, Body text, Muted text | #23302d, #3d4642, #5d625a |
headings, body text and secondary text |
| Error | #a1382a |
form errors |
The theme's stylesheet reads these colors from the palette (bg-sea-700, text-clay-600...), so changing Sea 700
in Styles recolors every primary button at once. To move to another brand color, change the whole Sea scale together
and keep the 700 shade dark enough for the light button text (4.5:1). The illustrations (assets/img/*.svg) and
the SVGs in Custom HTML blocks (the hero scene, the waves, the logo) carry their own hex colors: search for the old
values (for example #2c524d for Sea 700 and #1a3431 for Sea 900) to change them too. The browser UI color
(theme-color) is set in freeframe_flow_head_meta() in inc/setup.php.
Component classes from the HTML template work on blocks too: add them in Block settings > Advanced > Additional
CSS class(es). card gives a group the card look and card-hover lifts it on hover, arch is the rounded-top
frame around the portraits, pebble and pebble-2 are the irregular blobs, tag with tag-sea, tag-clay or
tag-sage makes a small pill, kicker is the small label after a wave above a heading, display, section-title
and card-title are the heading styles, lead the intro paragraph, soft (on a span inside a heading) the italic
clay words, text-link the underlined bold link, and on-dark on a dark group turns the kickers, links and outline
buttons inside it light.
Typography#
Two fonts are bundled in assets/fonts/ and declared in theme.json (settings.typography.fontFamilies), so no
request goes to Google: EB Garamond (variable, 400 to 600, with italics; preset serif) for headings and quotes,
and Mulish (variable, 400 to 800, italics 400 to 600; preset sans) for everything else. To use other fonts,
install them in Styles > Typography > Fonts (the Font Library) and select them, or replace the fontFace
entries in theme.json. The utility classes read the presets (--wp--preset--font-family--serif and --sans), so
keep those slugs.
Content#
Edit pages in Pages: click any text to change it, select a button to change its link. Sections are groups; open List View (the stacked lines icon at the top left) to select a section, move it, duplicate it or remove it. Text inside a Custom HTML block (the forms, the schedule's filters, the calculator) is edited in that block's HTML.
Everything the script works out comes from constants at the top of assets/js/main.js:
| Constant | What it holds |
|---|---|
STUDIO |
Name, timeZone (America/Los_Angeles), contact details, daysAhead (7), bookingCutoff (minutes before the start when booking closes, 0), demoFill (share of mats shown as taken, 0.45) |
ROOMS |
loft (16 mats, 4 per row) and garden (10 mats, 5 per row) |
TEACHERS |
morwenna, jago, anouk, kerensa: name, short name, role |
STYLES |
vinyasa, hatha, slow, yin, restore, pregnancy, beginners |
LEVELS |
open (All levels, 0 dots), gentle (1), steady (2), strong (3) |
CLASSES |
The weekly schedule: 30 classes with id, day (0 = Sunday), start (24-hour Pacific time, shown on the page in 12-hour form by hhmm()), mins, style, level, teacher, room |
PRICES |
Drop-in price, intro offer ($59 for 3 weeks), discount (concession, 20%), and the five options the calculator compares |
EVENTS |
Workshop and retreat ids, titles, kinds and dates: a rolling rule (for example the 1st Saturday of next month) or fixed date/end in the studio's time zone |
TOPICS |
Contact form topics that ?topic= can preselect |
Change them in a child theme, so a theme update doesn't undo your schedule. To add a class, add a
line to CLASSES with a unique id (bookings are saved against it):
{ id: 'thu-1230', day: 4, start: '12:30', mins: 45, style: 'slow', level: 'gentle', teacher: 'kerensa', room: 'garden' },To add a style, teacher or level, add it to the matching constant, add an <option> with the same key to the
filters in the schedule section's Custom HTML, and add its section to the Class Styles or Teachers page with its
key as the group's HTML anchor (Block settings > Advanced): the schedule links to /classes/#<style> and
/teachers/#<teacher>. The addresses of those two pages come from freeframe_flow_page_urls() in inc/setup.php;
change them there if you rename the pages' slugs.
Prices appear twice: in the cards on the Pricing page and in PRICES for the calculator. Change both. Workshops
also appear twice: the cards and the form's options on the Workshops page and EVENTS. The address, phone number
and email are in the footer pattern, on the Contact page and in STUDIO; search for them when you change them.
Classes that become attributes
A block keeps classes but not other attributes, so the patterns write the attributes the script and screen readers
need as classes, and freeframe_flow_block_attributes() in inc/setup.php turns them back into attributes when the
block is rendered. You only meet them when you add something the script fills in or filters:
| Class on the block (Advanced > Additional CSS class(es)) | Rendered as | Examples |
|---|---|---|
ffd-<name>--<value> (or ffd-<name>) |
data-<name>="<value>" |
ffd-event--breathwork on a workshop card, ffd-next-of--style:yin on the paragraph that shows a style's next class, ffd-faq on a question of the searchable FAQ |
ffa-<name>--<value> |
<name>="<value>" |
ffa-aria-live--polite on the live count under the filters, ffa-aria-labelledby--today-heading on a section named by its heading, ffa-aria-hidden--true on the icons inside a definition list |
ff-hidden |
hidden |
the "No questions match that" box the FAQ search shows when it finds nothing |
ff-el-dl, ff-el-dt, ff-el-dd, ff-el-address |
that element instead of the block's <div> or <p> |
the "Length / Room / Taught by" lists, the address on the Contact page |
Workshop dates: rolling or fixed
So the theme always has upcoming events, each event in EVENTS has a rolling rule, worked out from today's date
in Santa Cruz: monthsAhead (1 = next month), weekday (0 = Sunday ... 6 = Saturday) and nth (1–4, or -1 for the
last one in the month). days sets how long it lasts (default 1). For your real program, replace the rule with
fixed dates; an event with a date ignores its rule:
// Rolling: the 3rd Sunday of next month
inversions: { title: __('Arm balances & inversions, step by step'), kind: 'workshop', rule: { monthsAhead: 1, weekday: 0, nth: 3 } },
// Fixed: a two-day event on March 13–14, 2027 (end is optional)
'new-year': { title: __('Beginners’ weekend'), kind: 'course', date: '2027-03-13', end: '2027-03-14' },The dates on the cards (the span with data-event-when="<id>" in each card's "When" line), the short dates on the
home page teasers (data-event-short="<id>") and the inquiry form's options are filled in from EVENTS. Without
JavaScript the cards read "Dates on request". Keep the ids: ?event=<id> links use them.
Images and artwork#
There are no photos. All artwork is SVG drawn for this theme, in assets/img/ and used by Image blocks: select one
and Replace it.
pose-*.svg(240 × 240): a line figure over a colored pebble, used for the class styles.teacher-*.svg(240 × 300): arch-shaped portraits. To use photos, keep a 4:5 ratio and thearchclass on the group around the image so they get the same rounded top.- The home hero scene, the waves between sections, the $59 picture on the Pricing page and the tide lines on the Workshops page are inline SVG in Custom HTML blocks; replace any of them with an Image block if you prefer a picture.
map.svg(640 × 440) is an illustration, not a real map. Replace it with a screenshot of your own map or an embedded map.- The logo is
assets/img/logo.svgin an Image block next to the Salt & Sage name in the header and footer patterns. The social image isassets/img/og-image.png(1200 × 630, sourceog-image.svg); the faviconassets/img/favicon.svgis used until you set a Site Icon in Settings > General.
Icons are Icon blocks: select one and pick another from the Flow collection or WordPress's own.
Navigation, header and footer#
The header and footer are template parts (parts/header.html, parts/footer.html) showing the header and
footer patterns. Edit them in Appearance > Editor > Patterns > Header / Footer.
The header has two Navigation blocks showing the same menu: the desktop one (from 1280 px wide) and the one in the
mobile menu. Edit the menu once in Appearance > Editor > Navigation (the setup creates "Main menu": Home,
Schedule, Classes, Teachers, Pricing, Workshops, Beginners, Contact). The Home link has the class ff-mobile-only
(link settings > Advanced), so only the mobile menu shows it, as in the HTML version, where the desktop header has
the logo; freeframe_flow_desktop_nav() in inc/setup.php leaves it out of the desktop menu. A Navigation block
that doesn't point at a menu shows the most recently created one; to pin a menu, select the Navigation block and
choose it in the block settings, for both blocks. WordPress marks the current page in the menu, and
freeframe_flow_header_current() marks the logo on the home page.
The "My bookings" link with its count and the menu button are Custom HTML blocks in the header pattern: change their text there. The logo's two lines ("Salt & Sage" and "Yoga · Santa Cruz") are a paragraph in the header pattern, not the site title, so edit them in the pattern.
The footer's Practice and Studio menus are List blocks: click a link to change it, press Enter to add one. The small Custom HTML block after the footer is the toast that shows the script's messages ("Mat 7 reserved: ..."); keep it.
Features#
Today's classes and next class#
On the home page the list with data-today-list (a Custom HTML block in the today section) shows today's classes
with their state, and the card with data-next-class in the hero shows the next class that hasn't started yet, with
a button to reserve a mat. Times come from CLASSES and the current time in STUDIO.timeZone
(America/Los_Angeles), whatever the visitor's own time zone. Once today's last class has finished the list
switches to tomorrow ("Tomorrow at the studio"), so the page never looks empty. A class is "On now" between its
start and end, and the first class after now is "Up next". The kicker, heading and count above the list are blocks
with the classes ffd-today-date, ffd-today-heading and ffd-today-count; the script fills them in.
Schedule and filters#
The Schedule page shows today plus the next six days (STUDIO.daysAhead), one section per day, built by
renderTimetable() inside the Custom HTML block with data-timetable. Days with no matching classes are skipped
and a count is announced in the paragraph with the class ffd-tt-count. The three selects in the filter form
(data-tt-filters) filter by style, level and teacher; their values are kept in the address so filtered views can
be shared:
/timetable/?style=yin
/timetable/?teacher=jago&level=strongAddress values are only used when they are own keys of STYLES, LEVELS or TEACHERS
(Object.prototype.hasOwnProperty.call), so ?style=constructor is ignored. If nothing matches, the box with
data-tt-empty appears with a button to clear the filters.
Mat booking#
Every bookable class has a button with data-book="<class id>@<YYYY-MM-DD>". It opens the native <dialog> with
data-book-dialog (the booking-dialog section, one Custom HTML block) with a room plan (data-mat-grid): one
radio button per mat, laid out ROOMS[room].cols per row with the teacher at the front. Mats shown as taken are
demo data from takenMats(), a stable hash of the class and date controlled by STUDIO.demoFill; at least two mats
are always left free. Set demoFill to 0 when you connect real data.
Reserving saves the booking (see Saved data), updates the header count on every page,
the My bookings list on the schedule and the class row ("Mat 7 booked"). Opening a booked class lets you move to
another mat or cancel. Classes that have started or finished can't be booked; STUDIO.bookingCutoff closes booking
earlier if you set it above 0.
Bookings live only in the visitor's browser; the note under the mat map tells them reserved mats are listed under
My bookings. To take real bookings, connect a booking system (Momence, Mindbody, bsport, TeamUp and others have
widgets, plugins or APIs) and replace the confirm handler on [data-book-confirm] in main.js with a call to it,
or link the "Reserve a mat" buttons to its booking pages.
Accessibility: the dialog is a modal <dialog> (focus is trapped, Esc closes it and focus returns to the button
that opened it). Mats are a radio group inside a <fieldset> with a legend, taken mats are disabled and announced as
"taken", and confirmations appear in a polite live region (the toast).
Class styles and teachers#
On the Class Styles and Teachers pages, a paragraph with the class ffd-next-of--style:<key> or
ffd-next-of--teacher:<key> shows the next class of that style or teacher ("Next: Today at 6:00 PM with Jago"),
worked out from CLASSES. The level marks beside each style (one to three dots) are a Custom HTML block; the span
with data-weekly-of="style:<key>" inside it shows how many classes a week that style has. On the Teachers page the
same count is the small line under what each teacher teaches (a span with data-weekly-of="teacher:<key>" in the
"Teaches" text): the pattern carries the text for the demo schedule ("8 classes a week") and the script rewrites it
from CLASSES when the page loads.
The "Length / Room / Taught by" and "Teaches / Training / Off the mat" lists are definition lists: groups with
the classes ff-el-dl, ff-el-dt and ff-el-dd (see Classes that become attributes).
Intro-offer calculator#
The calculator on the Pricing page (data-price-calc, one Custom HTML block in the calculator section) takes
classes a week (1–6, a range input) and a discount checkbox. It shows what the intro offer costs per class over
three weeks and how much it saves on drop-in prices, then works out a month's cost for every option in
PRICES.options (52 weeks / 12 months): drop-in, 5-class pass, 10-class pass, Eight a month (plus extra per class
over eight) and Unlimited. The cheapest is highlighted and bars compare the rest. The discount only applies to
memberships. Results are announced through aria-live.
Workshops and retreats#
Each card on the Workshops page is a group with the class ffd-event--<id>. Dates come from EVENTS (rolling rules
or fixed dates, see Workshop dates) and the cards are sorted by date. Events
whose end date is before today are hidden, and their option is removed from the inquiry form. The "Everything /
Workshops / Retreats" buttons (data-kind-filter, a Custom HTML block) use aria-pressed. Each card's "Inquire"
button is a Custom HTML block with data-enquire="<id>": it preselects the event in the form, and
/workshops/?event=scilly#enquire does the same from another page (only ids in EVENTS are accepted).
To add a workshop, duplicate a card, change its class to ffd-event--<new id>, give its heading a new HTML anchor
and put the same anchor in the card's ffa-aria-labelledby--<anchor> class, change the ids in its "When" span and
its Inquire button, add an <option value="<new id>"> to the form's Custom HTML and add the event to EVENTS.
FAQ search#
The search box on the Beginners' Guide page (data-faq-search, a Custom HTML block) filters the questions as you
type, highlights the match in each question with <mark>, opens items whose match is only in the answer, hides
empty groups and announces the count. /guide/?q=mat pre-fills the search. The questions are Details blocks
(native <details>/<summary>) with the classes faq ffd-faq, so they work with the keyboard and without
JavaScript; each group of questions is a group with the class ffd-faq-group. To add a question, duplicate a
Details block and change its text. The round "+" at the end of each question and the span the search highlights
matches in are added when the block is rendered (freeframe_flow_faq_summary() in inc/setup.php). The count in
the search box's Custom HTML ("Showing all 15 questions.") is rewritten by the script.
The four questions on the Pricing page are Details blocks with the class faq only: they aren't searched.
Small extras#
- The header gets a hairline when you scroll. Below 1280 px the menu button opens the mobile menu, updating
aria-expandedand its label; Esc and a click outside close it. - Blocks with the class
revealfade up into view; revealing one also reveals everything before it. A class such as[--d:120ms]delays it. Reveals, the drifting cards and tide lines in the hero and the breathing dot stop for visitors who prefer reduced motion, and nothing is hidden without JavaScript. - The Contact page shows today's first door-opening time and last class end in the span with
data-today-hours. /contact/?topic=teachingpreselects a topic (own keys ofTOPICSonly).- A back-to-top button appears after one screen of scrolling and moves up out of the toast's way. To remove it,
delete the "Back to top" part at the end of
assets/js/main.jsand the.back-to-topstyles insrc/theme.css, then runpnpm build.
Block styles#
In the block settings' Styles panel:
| Block | Styles |
|---|---|
| Button | Fill (default, the sea green button), Outline, Sand, Clay |
The classes is-large and is-small on a Button block make it the hero or compact size. Inside a group with the
class on-dark, the Outline button is drawn in light sand. Icons on buttons and headings are classes too
(icon-before-calendar, icon-after-arrow-right, with icon-size-20); see src/icons.css for the available
icons.
Forms#
There are two forms, both Custom HTML blocks with novalidate, data-validate-form, inline errors and a success
state:
| Form | Page | Validates |
|---|---|---|
Booking inquiry (data-enquiry-form) |
Workshops & Retreats | Event chosen, name, valid email, optional phone format, terms checked |
Message (data-contact-form) |
Contact & Find Us | Name, valid email, topic chosen, message of at least 10 characters |
Each field names its error element with data-error-id and is linked to it with aria-describedby. On submit, the
first invalid field gets focus and a summary appears in a role="alert" paragraph. The success state confirms the
message or inquiry has reached the studio, shows a short reference in [data-success-ref] (SS- and four
characters, made in the browser by makeRef()) and says what happens next: a reply within one business day for
messages and within two business days, with a deposit link, for workshop inquiries. If your form service returns
its own reference, show that instead, and change the reply times to match how you actually handle messages.
The forms don't send anything until you connect them, although their success states read as if they had. Use a
form plugin (replace the form's Custom HTML block with the plugin's block; add the classes label, field and
btn btn-primary to its labels, fields and button), or send the form from the script (in a child theme): replace
the demo success block in the form[data-validate-form] submit handler in assets/js/main.js, for example with
Formspree or any service that accepts a POST:
fetch('https://formspree.io/f/your-id', {
method: 'POST',
body: new FormData(form),
headers: { Accept: 'application/json' }
}).then(function (res) {
if (!res.ok) throw new Error('Send failed');
form.hidden = true;
done.hidden = false;
done.focus();
}).catch(function () {
summary.textContent = 'Sorry, that didn’t send. Please email hello@saltandsageyoga.example.';
summary.hidden = false;
});Saved data (localStorage)#
| Key | Shape | Validated on read |
|---|---|---|
flow.bookings |
[{ "c": "mon-0700", "d": "2026-10-19", "m": 7 }]: class id, studio date, mat number |
Must be an array; c must be an own key of the classes; d must be YYYY-MM-DD on the class's weekday; m a whole number within the room's mats. Duplicates and classes that have finished are dropped and the cleaned list is written back. |
All access goes through one safeStorage object in assets/js/main.js. When localStorage is blocked (sandboxed
iframes, strict privacy settings) it falls back to an in-memory store, so booking still works for the rest of the
page view. To reset, run localStorage.removeItem('flow.bookings') in the browser console or cancel each booking
under My bookings. Nothing is saved in WordPress.
SEO and sharing#
Page titles come from WordPress: the page title, an em dash, the site name and the town (for example "Schedule &
Booking — Salt & Sage Yoga, Santa Cruz"); the home page shows the site name and tagline (Settings > General).
The town is added by freeframe_flow_title_parts() in inc/setup.php: change "Santa Cruz" there, or remove the
filter. The theme doesn't output meta descriptions or Open Graph tags; use an SEO plugin such as Yoast SEO, Rank
Math or The SEO Framework, and give it assets/img/og-image.png (or your own 1200 × 630 image) as the default
social image. WordPress already generates a sitemap at /wp-sitemap.xml. A studio benefits from LocalBusiness or
ExerciseGym structured data (schema.org) with your real name, address, phone and hours; most SEO plugins can add
it. The theme doesn't include it because it would describe a fictional studio.
Accessibility#
Built in: a skip link to the main content (added by WordPress, styled by the theme), landmarks (header, labeled
navigation, main, footer), one h1 per page, sections named by their headings, visible focus outlines, the menu
button with aria-expanded and a label that changes with its state, a native <dialog> for booking with a radio
group for the mats, filter buttons with aria-pressed, native details for the FAQs, live regions for the schedule
count, the FAQ results, the calculator and the booking confirmations, form errors announced through
aria-describedby and aria-invalid with focus moved to the first problem, alt text or aria-hidden on every
picture, and reduced-motion support for every animation. The demo passes axe (WCAG 2.1 A and AA).
When you edit: keep one Heading 1 per page and don't skip heading levels, give images alt text (or mark them
decorative), keep link text meaningful, check contrast when you change colors (especially light text on Sea 700 and
muted text on Sand), label any field you add to a form (<label for="...">), and when you rename a heading's HTML
anchor, change the ffa-aria-labelledby--<anchor> class on its section to match.
Building and deploying#
You only need this if you change the theme's files. The stylesheet assets/css/theme.css is compiled with Tailwind
CSS from src/theme.css and the classes used in patterns/, parts/, templates/, inc/ and assets/js/:
pnpm install
pnpm build # compile assets/css/theme.css and assets/css/editor.css
pnpm watch # recompile assets/css/theme.css on every change (run pnpm build before you commit)Run pnpm build after adding a utility class to a pattern, template or the script's markup, otherwise the class
has no style. Classes you type in the editor's Additional CSS class(es) field are only styled if the stylesheet
already contains them.
To deploy, zip the theme folder (named freeframe-flow, without node_modules/) and upload it in Appearance >
Themes, or copy the folder to wp-content/themes/ on your server. Serve the site over HTTPS, especially once the
forms are connected.
Translations#
The theme is translation-ready with the text domain freeframe-flow. All text in patterns, templates and PHP goes
through WordPress's translation functions; the script's strings (class styles, teachers, rooms, the lines of the
schedule, the booking dialog, the calculator, form errors and messages) are translated in PHP
(freeframe_flow_script_strings() in inc/setup.php). Create a translation with Loco Translate, or with WP-CLI and
Poedit:
wp i18n make-pot wp-content/themes/freeframe-flow wp-content/themes/freeframe-flow/languages/freeframe-flow.potSave freeframe-flow-es_ES.mo (for example) in wp-content/languages/themes/ or in the theme's languages/
folder. Page content created by Flow setup is copied into your pages in the site's language at that moment;
translate it in the editor like any other content. Dates and prices are formatted in US English by the script
(toLocaleDateString and toLocaleString with en-US), and times on a 12-hour clock by hhmm().
Child themes#
Use a child theme for changes you want to keep when Flow is updated (your schedule, teachers, prices and workshop
dates in particular). Create wp-content/themes/flow-child/style.css:
/*
Theme Name: Flow Child
Template: freeframe-flow
*/Templates, parts, patterns and theme.json in the child theme override the parent's files of the same name. To use
your own copy of assets/js/main.js, dequeue the parent's script (freeframe-flow) and enqueue yours in the
child's functions.php, keeping the inline window.freeframeFlow strings and page URLs (or copy them). The
parent's stylesheet only contains the classes the parent uses: if your child theme uses new utility classes,
compile a stylesheet for the child (copy package.json and src/theme.css, point the @source lines at the
child's folders) and enqueue it.
Troubleshooting#
- The pages look unstyled or new classes do nothing. The stylesheet only contains classes it found when it was
built. Run
pnpm buildafter editing patterns, then reload. - "This block contains unexpected or invalid content". A pattern or page was edited by hand with markup that doesn't match the block. Click Attempt recovery, or re-insert the section from Patterns > Flow.
- Classes show at the wrong time. Times are Pacific time (
STUDIO.timeZone), not the visitor's clock and not the WordPress time zone. If your studio is elsewhere, change the time zone and the "Pacific time" wording in the footer and the schedule's hero. - "Reserve a mat" does nothing on a page I built. The page needs the
booking-dialogsection (Patterns > Flow > Reserve a mat dialog). - A booking disappeared. Bookings are removed once the class has finished, and they live in one browser only. In a private window or with storage blocked they last for the current page view.
- A filter link doesn't filter. The value must match a key in
STYLES,LEVELSorTEACHERSexactly (?style=restore, not?style=restorative). - A new class doesn't show. Check its
day(0 = Sunday) and that itsstyle,level,teacherandroomkeys exist in the matching constants. - A workshop vanished. Events with a fixed
dateare hidden once it has passed; update the date, switch back to a rollingrule, or remove the card. - Home is missing from the desktop menu. Links with the class
ff-mobile-onlyonly show in the mobile menu. See Navigation, header and footer. - Flow setup says the pages exist, but they are empty. It never overwrites existing pages. Delete (and empty the trash of) the pages with those slugs, or open each page and insert its page pattern from Patterns > Flow pages.
- The forms don't send anything. They are demo forms; see Forms.
License#
MIT, which is compatible with the GPL that WordPress requires. See LICENSE.txt in the theme folder.
The code and all included artwork are free for personal and commercial use.
Fonts: EB Garamond and Mulish are licensed under the SIL Open Font License 1.1 (OFL.txt in each folder of
assets/fonts/).
Salt & Sage Yoga, its teachers, students, reviews, events and prices are fictional.