Re is out: see what's new Lifetime updates on every purchase Support replies within 24 hours Secure checkout via Gumroad 8,500+ sales since 2016

↑↓ Navigate ↵ Open Esc Close

All products
Re:Maily contact form builder is now available on WordPress.org See it live

Start here

Updated 2 min read 21 views

A theme changes Forma in three ways: it copies a template and edits it, sets CSS variables, or registers its own styles and fields with filters. All of it works the same in the free plugin and in Pro.

Where theme files go

Everything a theme adds lives in a forma/ folder of the theme, at the same path as in the plugin’s templates/ folder:

your-theme/
  forma/
    skins/my-card/skin.php        a card style
    skins/my-card/settings.php    its fields in the editor
    skins/my-card/style.css       loads only where the style is used
    filters/pills/filter.php      a filter style
    layouts/carousel/layout.php   a layout type
    notices/empty.php             an override of a built-in template
    icons/chevron-left.svg        an override of an icon

A child theme’s files win over the parent’s.

Find your task

I want toRead
Change the markup of a card, a control or a noticeTemplates and icons
Change colors, corners or spacingRestyle with CSS
Add a card design of my ownAdd a card style
Give my card style options in the editorSkin settings
Add fields to the layout editorExtend Forma → Editor fields
Add a layout type, an animation or a Metro patternExtend Forma → Layout types, Animations and patterns
Run my script after filtering or Load MoreExtend Forma → JavaScript events
Change the query or the data of each itemExtend Forma → Recipes
Look up a function, hook or settingDeveloper reference

Use the functions, not the classes

Call the functions Forma lists in Developer reference → Theme functions. The classes behind them may move from one version to the next; the functions stay.

// Layout 123, as its shortcode prints it
echo forma_render( 123 );

// Only its filter, for a sidebar
echo forma_render( 123, [ 'show' => 'filter' ] );

// Something for Pro sites only
if ( forma_is_pro() ) {
	// …
}
Was this article helpful?