Generate: Using Spintax

Page Generator Pro supports spintax, which allows you to generate variants of a string within your content, without using the Keywords system, in a random fashion.

Spintax Example

For example, a sentence might be:

Writing content is a lot of fun.

Using spintax, we can use:

{Writing|Creating} {content|articles} is a {lot of fun|rewarding experience}

Page Generator Pro will then, at random, generate a variation for each generated Page.  In this case there are 8 possible variations:

Writing content is a lot of fun
Creating content is a lot of fun
Writing articles is a lot of fun
Creating articles is a lot of fun
Writing content is a rewarding experience
Creating content is a rewarding experience
Writing articles is a rewarding experience
Creating articles is a rewarding experience

Nested Spintax Example

Spintax can also be nested.  For example:

{Hello|Hi}, {{Joe|Steve}|Tim|Tom}

Page Generator Pro will then, at random, generate a variation for each generated Page.  In this case there are 8 possible variations:

Hello, Joe
Hello, Steve
Hello, Tim
Hello, Tom
Hi, Joe
Hi, Steve
Hi, Tim
Hi, Tom

Using Spintax with Keywords

You can nest keywords within Spintax.  When this happens, Page Generator Pro will replace the keyword with one of the keyword terms, and then execute / run the spin.  For example, if we have a city keyword with the terms Birmingham and London:

Thanks for visiting {{city}|us}

Page Generator Pro will then, at random, generate a variantion for each generated Page.  In this case there are 3 possible variations:

Thanks for visiting Birmingham
Thanks for visiting London
Thanks for visiting us

Supported Fields

Spintax is supported on all fields on the Generate screen, including Page Builders.

We do not recommend using Spintax on the Title or Permalink.  This is because Spintax increases the chances of the same Title / Permalink being generated twice in a generation set.  As WordPress does not support multiple Pages having the same URL, and Page Generator Pro avoids duplicate content by Title and Permalink, should this condition occur, the duplicate Pages would not be generated.  This results in fewer Pages being generated than expected, and is by design.

Troubleshooting Spintax

  1. Ensure that you’re using the exact format in the above example.
  2. Some users report issues of Spintax failing to work when pasting Spintax into the Visual Editor of the Content window; to workaround this, use the Text view (Page Generator Pro > Generate > click “Text” tab on the Content section > paste Spintax).

Keywords vs Spintax

Keywords are more suited to generating uniform Pages, with each Page using one Term across all fields for that given Page – for example, if we’re generating a unique page for 3 cities (Birmingham, London and Bristol), we’d want the same city term to be used across every content field on a Page:

  • Birmingham Travel Guide
  • London Travel Guide
  • Bristol Travel Guide

It wouldn’t be useful if the Birmingham Travel Guide had London in it!

Spintax is more suited to quick, inline random Pages, where you’re not fussed what the content is for each generated Page – so long as it’s some variant of the supplied spintax.

You can use Keywords, Spintax or a mixture of both on your Generated Pages.