Documentation
Everything you need to build a world-class WordPress site with GRATIS. Free, open source, no upsells.
Installation
Three ways to install GRATIS. All free, no account required.
Go to Appearance → Themes → Add New → Upload Theme, choose the gratis.zip file, click Install Now, then Activate.
# Install and activate in one command
wp theme install https://github.com/your-repo/gratis/archive/main.zip --activate
# Or clone and symlink for development
git clone git@github.com:your-repo/gratis.git wp-content/themes/gratis
wp theme activate gratis
Upload the gratis/ folder to wp-content/themes/ via FTP, then activate from Appearance → Themes.
Your first page
After activating GRATIS, create a landing page in under 2 minutes:
- Go to Pages → Add New
- Click the + button in the top-left of the editor
- Switch to the Patterns tab
- Click Heroes category and insert Hero — Bold Centered
- Add more sections: Features, Testimonials, CTA
- Click Publish
Using patterns
GRATIS ships with 21 block patterns across 12 categories. Browse them all at /patterns.
You can also insert any pattern via block markup:
<!-- wp:pattern {"slug":"gratis/hero-bold"} /-->
<!-- wp:pattern {"slug":"gratis/pricing-cards"} /-->
<!-- wp:pattern {"slug":"gratis/testimonials-grid"} /-->
Colors & typography
GRATIS uses theme.json v3 as its design system. Change your accent color once and it updates everywhere.
Via the editor (no code): Go to Appearance → Editor → Styles (the half-circle icon). Click any color to change it globally.
Via theme.json (developers):
// theme.json — change the primary color
{
"settings": {
"color": {
"palette": [
{ "slug": "primary", "color": "#your-color", "name": "Primary" }
]
}
}
}
primaryaccentbase-darksuccessdangerLive search
Add instant search to any page. Searches posts, pages, and WooCommerce products via the WordPress REST API. Zero dependencies, 200ms debounce.
<!-- Add an HTML block to any page -->
<div class="gratis-search-wrap">
<input type="search"
class="gratis-search-input"
placeholder="Search posts, pages, products..."
autocomplete="off">
</div>
- Debounces input by 200ms
- Queries
/wp-json/wp/v2/search - Shows dropdown with type badges
- Keyboard navigation supported
↑ ↓Navigate resultsEnterOpen resultEscClose dropdown
Async notifications
GRATIS includes a toast notification system and bell icon panel. Call from any JavaScript on your site.
// Toast notifications
// Types: success | error | warning | info
GRATIS.toast("Item saved!", "success");
GRATIS.toast("Something went wrong", "error", 8000); // 8s duration
GRATIS.toast("Processing...", "info", 0); // stays until dismissed
// Bell panel notifications (also shows toast)
GRATIS.notify("New comment on your post", "info", "/post/123");
GRATIS.notify("Order #1234 shipped!", "success", "/orders");
// WooCommerce: fires automatically on add-to-cart
// No setup needed — it just works
Performance
GRATIS scores 100/100 on PageSpeed out of the box. Here is what makes it fast: