Generate: Using Keywords

Overview

Your defined Keywords can be used in any editable text field or Page Builder on a Content Group or Term Group.

When generating content, Page Generator Pro will replace these keywords with actual terms specified in the keywords.  For example, if our {service} keyword comprises of Web Design and Web Development, the Plugin would generate at least two Pages:

  1. Web Design in…
  2. Web Development in…

Depending on the field you’re editing, and the editor experience you’re using, you can add keywords to your content in a number of ways:

Insert Keyword Dropdown

The Insert Keyword dropdown option is displayed on some fields, such as the Title and Excerpt:
Page Generator Pro: Generate: Keyword Dropdown

Autocomplete

For most fields, you can start typing in a field. A list of matching keywords will be displayed.

Continue to type until you see the keyword you want to insert, and click the keyword.

For example, to add a defined Keyword called service, we can start typing ser, and then click the resulting keyword in the list:Page Generator Pro: Generate: Content: Using Keywords: Autocomplete

To hide or cancel autocompletion, either press the escape key, or click outside of the list of suggested keywords.

Gutenberg Blocks

Start typing in any block by entering {, and a list of matching keywords will be displayed.  Continue to type until you see the keyword you want to insert, and click the keyword.

For example, to add a defined Keyword called service, we can start typing {ser, and then click the resulting keyword in the list:

Page Generator Pro: Generate: Content: Using Keywords: Gutenberg Block

To hide or cancel autocompletion, either press the escape key, or click outside of the list of suggested keywords.

Classic / Visual / TinyMCE Editor

Start typing in any TinyMCE Editor instance by entering {, and a list of matching keywords will be displayed.  Continue to type until you see the keyword you want to insert, and click the keyword.

For example, to add a defined Keyword called service, we can start typing {ser, and then click the resulting keyword in the list:

Page Generator Pro: Generate: Content: Using Keywords: TinyMCE Autocomplete

To hide or cancel autocompletion, either press the escape key, or click outside of the list of suggested keywords.

Entering keywords manually into Visual Editors or Page Builders? Make sure that the keyword is pasted as plain text.  You can confirm this by going into the HTML view of most Visual Editors or Page Builders, and confirming that the keyword appears as plain text e.g. {keyword}, not wrapped in HTML tags e.g. <span>{</span>keyword<span>}</span>

Transforming Keywords

Assuming you have the following example Keyword configured:

Setting Value
Keyword location
Terms Birmingham, West Midlands
Harborne, West Midlands
Selly Oak, West Midlands
Delimiter ,
Columns city, county

The output of keyword terms can be transformed, by using a flag after the keyword.  In the above example, this means that we could use the following keywords in our Content Group:

Transformation Syntax Output
Uppercase {location:uppercase_all} BIRMINGHAM, WEST MIDLANDS
Lowercase {location:lowercase_all} birmingham, west midlands
Capitalise first letter {location:uppercase_first_character} Birmingham, west midlands
Capitalise first letter of each word {location:uppercase_first_character_words} Birmingham, West Midlands
Convert to Permalink style slug {location:url} birmingham-west-midlands

Apply Multiple Keyword Transformations

Up to 2 keyword transformations can be applied to a keyword.

Transformations are applied in the order they are written, from left to right.  Taking the below example, where the URL transformation will lowercase the string:

Transformation Syntax Output
Uppercase and Convert to Permalink style slug {location:uppercase_all:url} birmingham-west-midlands
Convert to Permalink style slug and Uppercase {location:url:uppercase_all} BIRMINGHAM-WEST-MIDLANDS

 

Extracting Term Subsets (Columns)

We can output a subset of each Term’s data by using the keyword’s defined columns.  In the above example, this means that we could use the following keywords in our Content Group:

Keyword Example Value
{location(city)} Birmingham
{location(county)} West Midlands

Keyword Transformations can also be applied to Keyword Columns.  Taking {location(city)} as an example:

Transformation Syntax Output
Uppercase {location(city):uppercase_all} BIRMINGHAM
Lowercase {location(city):lowercase_all} birmingham
Capitalise first letter {location(city):uppercase_first_character} Birmingham
Capitalise first letter of each word {location(city):uppercase_first_character_words} Birmingham
Convert to Permalink style slug {location(city):url} birmingham

Force Keyword Term

The output of the keyword can be forced to always output a specific term.  In the above example, this means that we could use the following keywords in our Content Group:

Transformation Syntax Output
Force Specific Term {location:3} Selly Oak, West Midlands
Force Specific Term {location(city):3} Selly Oak

Combining Column Names, Transformations and Forcing Term

Any combination of the above Using Keywords sections can be used.  For example:

Transformation Syntax Output
Output City Name, Uppercase {location(city):uppercase_all} BIRMINGHAM
Output 3rd City Name, Lowercase {location(city):3:lowercase_all} selly oak

Using Taxonomy Keywords in Groups

Any Taxonomy can also be used as a Keyword, by inserting the {taxonomy_name} tag into your content (where name is replaced by the name of your Taxonomy).  For example, if you have Categories defined on your WordPress web site (typically found at Posts > Categories), you’d use :
Page Generator Pro: Generate: Content: Taxonomy Keywords

It’s best to think of Taxonomies as predefined Keywords.  Your Taxonomy Terms are the equivalent of a Keyword’s Terms

You can insert Taxonomy Keywords manually into any content-based text field, even if the Insert Keyword dropdown isn’t present.  For example:

  • Title
  • Permalink
  • Content
  • Excerpt
  • Custom Fields
    • Meta Key
    • Meta Value