Title: Spintax
Author: Franky
Published: <strong>May 11, 2026</strong>
Last modified: May 11, 2026

---

Search plugins

![](https://ps.w.org/spintax/assets/banner-772x250.png?rev=3528366)

![](https://ps.w.org/spintax/assets/icon.svg?rev=3528366)

# Spintax

 By [Franky](https://profiles.wordpress.org/301st/)

[Download](https://downloads.wordpress.org/plugin/spintax.1.5.0.zip)

 * [Details](https://wordpress.org/plugins/spintax/#description)
 * [Reviews](https://wordpress.org/plugins/spintax/#reviews)
 *  [Installation](https://wordpress.org/plugins/spintax/#installation)
 * [Development](https://wordpress.org/plugins/spintax/#developers)

 [Support](https://wordpress.org/support/plugin/spintax/)

## Description

Spintax is a WordPress plugin for template-based content generation using spintax
markup. Create reusable templates with randomised text variants, variable substitution,
and permutation logic — then embed them anywhere on your site via shortcodes or 
PHP.

**Key features:**

 * **Enumerations** `{a|b|c}` — randomly pick one option, with nesting support
 * **Permutations** `[<config>a|b|c]` — pick N elements, shuffle, join with custom
   separators
 * **Variables** `%var%` — global, local (`#set`), and shortcode-level variable 
   scopes
 * **Conditionals** `{?VAR?then|else}` — render a branch based on whether a variable
   is set (also `{?!VAR?then}` inverted)
 * **Plural agreement** `{plural <count>: form1|form2|form3}` — pick grammatically
   correct noun form by count. RU/UK/BE 3-form (one|few|many), EN-style 2-form (
   one|many). First spintax engine with first-class plurals.
 * **Nested templates** — embed templates within templates via `#include` or `[spintax]`
 * **Object cache** — rendered output cached via WP Object Cache API (Redis/Memcached
   ready)
 * **Cron regeneration** — optional scheduled cache refresh per template
 * **Validation** — bracket matching, circular reference detection, syntax checking
 * **Admin UI** — code editor, live preview, shortcode copy, settings page

**Syntax based on the GTW (Generating The Web) standard.**

### External services

This plugin does **not** connect to any external services, APIs, or third-party 
servers.

All content generation happens locally on your WordPress server. No data is sent
externally. No remote requests are made during activation, rendering, or caching.

### Privacy Policy

This plugin does not collect, store, or transmit any personal user data. It does
not use cookies, tracking pixels, analytics, or any form of telemetry.

Templates and their rendered output are stored entirely within your WordPress database
and object cache.

### Credits

 * Syntax based on the [GTW (Generating The Web)](https://spintax.net) standard
 * Developed by [301st](https://301.st)

## Screenshots

 * [[
 * Template editor with spintax markup and live preview.
 * [[
 * Settings page with global variables editor.
 * [[
 * Template list with shortcode, cache status, and cron schedule.

## Installation

 1. Upload the `spintax` folder to `/wp-content/plugins/`
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Create templates under the “Spintax” menu in the admin sidebar
 4. Embed templates using `[spintax slug="my-template"]` in posts/pages or `spintax_render('
    my-template')` in theme files

## FAQ

### How do I create a template?

Go to Spintax > Add New in the WordPress admin. Enter a title and your spintax markup
in the editor.

### What syntax does the plugin use?

 * `{a|b|c}` — randomly picks one option
 * `[a|b|c]` — permutation: picks N elements, shuffles, joins with space
 * `[<minsize=2;maxsize=3;sep=", ";lastsep=" and "> a|b|c|d]` — configured permutation
 * `%variable%` — variable reference
 * `#set %var% = value` — local variable definition
 * `{?VAR?then|else}` — conditional: render a branch by truthiness of `%VAR%` (also`{?!
   VAR?then}` inverted)
 * `{plural %Count%: form1|form2|form3}` — plural agreement: picks the correct grammatical
   form by count (RU 3-form, EN 2-form)
 * `/#comment#/` — block comment (stripped from output)
 * `#include "slug"` — embed another template

Full syntax reference with examples and a live playground: https://spintax.net/docs/
syntax

### Where can I learn more?

 * **Documentation hub:** https://spintax.net/docs/ — guides, reference, recipes
 * **Compact syntax reference:** https://spintax.net/docs/syntax — all primitives
   in one page (13 languages)
 * **Plural agreement guide:** https://spintax.net/docs/plural-spintax/ — `{plural
   N: form1|form2|form3}` in depth (EN/RU)
 * **Conditional spintax guide:** https://spintax.net/docs/conditional-spintax/ —`{?
   VAR?then|else}` value-driven branching (EN/RU)
 * **Authoring mindset:** https://spintax.net/docs/authoring-mindset/ — write the
   final text first, add markup last (EN/RU)
 * **Live playground:** https://spintax.net/play/ — write a template, set variables,
   render N variants in your browser (EN/RU)

### Does caching require Redis or Memcached?

The plugin uses the WordPress Object Cache API. With a persistent backend (Redis,
Memcached), cached output persists across requests. Without one, templates are re-
rendered on each page load.

### Can I pass variables through shortcodes?

Yes: `[spintax slug="greeting" name="Alice" city="Moscow"]` makes `%name%` and `%
city%` available inside the template.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Spintax” is open source software. The following people have contributed to this
plugin.

Contributors

 *   [ Franky ](https://profiles.wordpress.org/301st/)

[Translate “Spintax” into your language.](https://translate.wordpress.org/projects/wp-plugins/spintax)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/spintax/), check out
the [SVN repository](https://plugins.svn.wordpress.org/spintax/), or subscribe to
the [development log](https://plugins.trac.wordpress.org/log/spintax/) by [RSS](https://plugins.trac.wordpress.org/log/spintax/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.5.0

 * Add: plural agreement primitive `{plural <count>: form1|form2|form3}` — pick 
   the correct grammatical form by count. RU/UK/BE = 3 forms (`one|few|many`); EN/
   ES/PT/DE etc. = 2 forms (`one|many`). Count is a `%var%` reference or literal
   integer (resolved after variable expansion, so helper-var patterns via `#set`
   work). Locale comes from per-template post meta `_spintax_locale` or the WordPress
   site locale. Lenient at runtime: malformed constructs render verbatim with fullwidth
   braces instead of crashing the page. First spintax engine to treat plural as 
   a first-class primitive.
 * Add: validator surface for plural blocks — structural check (form slot rejects
   nested `{}`, `[]`) always on; arity check (RU expects 3, EN expects 2) when locale
   is known.
 * Internal: 74 PHPUnit cases mirroring the canonical TS implementation (`spintax-
   plurals.test.ts` in casino-platform). Engine classes `Plurals`, `PluralArityError`,`
   PluralFormError` ship alongside `Conditionals` from 1.4.0.

#### 1.4.0

 * Add: conditional syntax `{?VAR?then|else}` — render a branch based on whether
   a variable is set/non-empty (also `{?!VAR?then}` for inverted, optional else).
   Resolves both before and after `%var%` expansion, so conditionals inside variable
   values work too.
 * Add: single-token abbreviation whitelist in post-processing — known shorthands
   like `соц.`, `эл.`, `Mr.`, `Inc.` no longer trigger sentence-end capitalisation
   of the next word. Covers Russian editorial/address/unit shorthands plus English
   titles and business suffixes.
 * Fix: `#set` directive with an empty value (`#set %x% =`) no longer silently swallows
   the next directive on the following line.
 * Fix: HTML start tags inside permutation alternatives (e.g. `[<li>item</li>|<li
   >...]`) are no longer mis-parsed as a `<config>` block.
 * Improve: cache description in template meta box and global settings now explains
   that visitors see the same generated variant per runtime context until expiry
   or regeneration.
 * Internal: regression tests for IDN domains flanked by Cyrillic letters and for
   randomisation behaviour across renders.

#### 1.1.0

 * Add: per-element permutation separators — assign custom separator to each element
   via `< sep >` before `|`
 * Add: auto-spacing for purely alphabetic word separators (e.g. `<and>`, `<или>`)
 * Security: sanitize raw spintax input with custom sanitize_spintax() — strips 
   invalid UTF-8, null bytes, and control characters while preserving angle-bracket
   syntax

#### 1.0.1

 * Fix: permutation minsize/maxsize logic when only one parameter is specified
 * Fix: preview rendering no longer strips spintax config from template input
 * Fix: child templates no longer inherit parent’s local #set variables
 * Improve: global variables editor now uses #set textarea (paste full blocks)
 * Improve: validation errors displayed on template edit screen with line numbers
 * Improve: “Regenerate Public Cache” now forces fresh subtree render
 * Add: demo template created on first activation
 * Add: SECURITY.md with responsible disclosure policy
 * Add: Privacy Policy and External Services sections in readme.txt
 * Code: PHPCS 0 errors, full WP.org review compliance

#### 1.0.0

 * Initial release
 * GTW-compatible spintax engine with nested enumerations and permutations
 * Template CPT with code editor and admin preview
 * Shortcode and PHP rendering API
 * Object cache with versioned keys and cascade invalidation
 * Per-template cron regeneration
 * Global and local variable scopes
 * Settings page with global variables editor

## Meta

 *  Version **1.5.0**
 *  Last updated **5 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.2 or higher **
 *  Tested up to **6.9.4**
 *  PHP version ** 8.0 or higher **
 * Tags
 * [content generation](https://wordpress.org/plugins/tags/content-generation/)[dynamic content](https://wordpress.org/plugins/tags/dynamic-content/)
   [seo](https://wordpress.org/plugins/tags/seo/)[spintax](https://wordpress.org/plugins/tags/spintax/)
   [templates](https://wordpress.org/plugins/tags/templates/)
 *  [Advanced View](https://wordpress.org/plugins/spintax/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/spintax/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/spintax/reviews/)

## Contributors

 *   [ Franky ](https://profiles.wordpress.org/301st/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/spintax/)