Generate

Once your keywords are setup, you can use the Generate option to define one or more Groups.

A Group contains the settings you want to use when you ‘run’ that group to generate the Posts / Pages / Custom Post Types.

Click on the Page Generator Pro menu entry in the WordPress Administration, and then click Generate.

Screen Shot 2014-01-29 at 15.17.05

From this screen, you can:

  • Add a new Generation Group: Click the Add New button to the right of the title.
  • Edit an existing Group: Click on the Edit text below the group you want to edit.
  • Delete an existing Group: Click on the Delete text below the group you want to delete.

Using Keywords in Groups

Your defined Keywords can be used in most areas of a Group.  Depending on the field you’re editing, you can either use the Insert Keyword dropdown option:
Screen Shot 2015-10-05 at 13.07.16

Alternatively, you can manually insert keywords by using the curly braces option.  For example, to add a defined Keyword called city, you’d use {city}
Screen Shot 2015-10-05 at 13.07.33

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

  • Title
  • Permalink
  • Content
  • Excerpt
  • Custom Fields
    • Meta Key
    • Meta Value
  • Taxonomies (where non-hierarchal e.g. tag based)

Keyword terms can be transformed, by using a transformation flag after the keyword.  For example, if you have a {city} keyword with the term Birmingham, West Midlands:

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

Content

  • Title: The Title for each generated Page, Post or Custom Post Type. Supports keywords, which can be inserted manually or by clicking on the relevant keywords below.  A different keyword data item is then chosen for each generated Post.
  • Content: The content for each Page, Post or Custom Post Type. Also supports keywords, which can be inserted manually or by clicking on the keyword button within the Visual Editor.

The content editor also supports the following dynamic content blocks:

Google Map

Click the Google Map icon:
Screen Shot 2014-01-29 at 15.27.31

Enter the following information:

screen-shot-2016-12-05-at-15-16-59

  • Location: Enter the city and country (or keyword, if you have one that has keyword data comprising of cities and/or countries)
  • Zoom Level: Choose a zoom level for the Map.  A higher number means the map will be more zoomed in.

A shortcode will then appear within the content:
screen-shot-2016-12-05-at-15-17-42

Wikipedia Article

Click the Wikipedia icon:
Screen Shot 2014-01-29 at 15.40.58

Enter the following information:

screen-shot-2016-12-05-at-15-18-35

  • Term: Wikipedia title or keyword (e.g. Birmingham or {city}).
  • Language: Choose the language to return the content in.

A shortcode will then appear within the content:
Screen Shot 2014-01-29 at 15.42.38

Yelp Business Listings

Click the Yelp icon:
Screen Shot 2014-01-29 at 15.43.31

Enter the following information:

screen-shot-2016-12-05-at-15-19-40

  • Term: Business term(s) to find matching results for (e.g. Restaurants)
  • Location: The city to display Yelp Business Listings for, or use a keyword (e.g. Birmingham or {city})
  • Number of Listings: The number of Yelp! Business Listings to display (e.g. 5)

A shortcode will then appear within the content:

Screen Shot 2014-01-29 at 15.44.48

500px Image

This shortcode imports an image from 500px to your WordPress Media Library, and embeds the image in the content.

Click the 500px icon:
Screen Shot 2016-06-16 at 11.52.59

Enter the following information:

screen-shot-2016-12-05-at-15-21-23

  • Image Size: Choose an image size to import.  Note: these are defined by the 500px API.
  • Term: Enter a search term.  For example, to display an image of a building, use building
  • Location (optional): Optionally specify where the image should have been photographed.  This is used in conjunction with the Term above, so if we wanted to show an image of a building in Birmingham, UK, use Birmingham, UK

A shortcode will then appear within the content:

Screen Shot 2016-06-16 at 11.55.35

YouTube Video

This shortcode embeds a YouTube Video in the content.

Click the YouTube icon:
Screen Shot 2016-06-27 at 17.04.11

Enter the following information:

screen-shot-2016-12-05-at-15-21-42

  • Term: Enter a search term.  For example, to display an image of a building, use building
  • Location (optional): Optionally specify where the video is based.  This is used in conjunction with the Term above, so if we wanted to show an image of a building in Birmingham, UK, use Birmingham, UK

A shortcode will then appear within the content:

Screen Shot 2016-06-27 at 17.04.27


Permalink

Automatically generated, but again can be manually specified with keywords.   A different keyword data item is then chosen for each generated Post.

screen-shot-2016-12-05-at-15-22-51


Excerpt

Displayed if the Post Type supports Excerpts.

Allows you to specify the excerpt for each Post that is generated.  Keywords can be used here by clicking the Insert Keyword dropdown, and clicking the keyword tag to use:

Screen Shot 2015-10-05 at 13.02.07


Custom Fields

You can add, edit or delete custom fields (Post Meta fields) to each generated Page:

  • To add a Custom Field, click the Add Custom Field button, and then define the Meta Key and Meta Value.
    Screen Shot 2015-10-05 at 13.05.12
  • To edit an existing Custom Field, change the Meta Key and/or Meta Value to suit.
  • To delete an existing Custom Field, click the delete link below the Meta Key field.
    screen-shot-2016-12-05-at-15-23-25

You’ll use Custom Fields to define the required metadata for your SEO Plugin.  Read this documentation for further instructions.


Author

  • Rotate: If checked, this option will choose a different Author for each Post that is generated.  If not checked, an additional option will appear, allowing you choose which Author should be assigned to the Post.
    Screen Shot 2014-01-29 at 15.21.49

Discussion

Display if the Post Type supports Comments

  • Allow comments: Choose to allow comments to be added to each generated Post.
  • Allow trackbacks and pingbacks: Choose to allow trackbacks and pingbacks to be added to each generated Post.

Publish

  • Post Type: Choose the Post Type to generate.  This might be Pages, Posts or any registered Custom Post Types provided by your themes or plugins.
  • Status: Choose the status of each generated Page
    • Draft: Saves each generated Page as a draft.  You’ll then need to go to each Page and manually publish them if you want visitors to see them.
    • Scheduled: Schedules publication of each Page.  The first Page will be published immediately on Page Generation, with additional Pages being scheduled based on the Schedule Increment setting
    • Private: Saves each generated Page as private.
    • Published: Publishes each generated Page.
  • Schedule Increment: When Status = Scheduled, this option appears, allowing you to define the scheduled publication date and time relative to the last generated Page.

Generation

The generation section allows you to control how Pages/Posts are generated.  To explain how this works, let’s assume the following setup:

Keyword Terms
city Birmingham, London, Manchester
service Web Design, Web Development

 

Field Content
Title {service} in {city}
Content Read more about {service} in {city}

All

The All method generates Pages/Posts for all possible unique combinations of terms across all keywords used.  In the above example, this would produce the following Pages:

  • Web Design in Birmingham
  • Web Design in London
  • Web Design in Manchester
  • Web Development in Birmingham
  • Web Development in London
  • Web Development in Manchester

This method will not result in duplicate content.

Sequential

The Sequential method generates Pages/Posts, honoring the precise order of each keyword’s terms.  In the above example, this would produce the following Pages:

  • Web Design in Birmingham
  • Web Development in London

Because the {service} keyword does not have a third term, page generation stops, and the {city} third term (Manchester) is not used.

This method will not result in duplicate content.

Random

The Random method generates Pages/Posts, randomly picking one term for each keyword for each Page/Post that’s generated.  In the above example, this might produce the following Pages:

  • Web Design in Manchester
  • Web Development in London

This method may result in duplicate content. It’s only recommended for placeholder / dummy content that you want to quickly produce.

Other Settings

There are other generation settings which work in conjunction with the above method:

  • Overwrite: Enable this option to overwrite existing generated Pages.  This will happen if all of the following conditions are met:
    • The Permalink of the generated Page matches an existing Permalink for a generated Page, and
    • The existing generated Page was generated by this Plugin’s Group.
  • No. Posts: Choose the number of Posts to generate.  If zero or blank, Page Generator Pro will attempt to produce all possible combinations based on the above generation method.  For the Random method, a number must be specified.
  • Resume Index: By default, Page Generator Pro starts at a zero based index for keyword terms.  You can choose to start at a different index (if, for example, Page Generation did not fully complete), by setting Resume Index to restart on the nth iteration.

Note: The plugin compares the No. Posts above, and the maximum number of unique Posts it could generate based on the keywords inserted into the various fields.

If No. Posts is the bigger number, the plugin will only generate the maximum number based on the above calculation.
If No. Posts is the smaller number, the plugin will generate the value specified in No. Posts.


Page Attributes

Displayed if the Post Type supports Page Attributes

  • Parent: The Parent Page to assign the Generated Pages to.  For performance, this is an ID.  To find the ID of the Page you want as the parent, edit the Parent Page in WordPress and make a note of its ID:
  • Template: The Page Template to use

Taxonomies

Displayed if the Post Type supports Taxonomies.  Pages do not typically have taxonomies, so you will not see any!

  • Taxonomy Terms: For each Taxonomy for the Post Type, you can choose which Term(s) to assign to the generated Posts.
    Screen Shot 2014-01-29 at 15.23.00

Featured Image

You can optionally assign a Featured Image to the Posts, Pages or Custom Post Types you’ll be generating. There are two settings: Image Source and Value

Screen Shot 2016-06-16 at 11.58.34

  • Media Library Image: Value must be a Media Library Image ID
  • Image URL: Value must be a URL to an image.  This can be a remote image, such as http://placehold.it/400×400.  If the image is remote, the generation process will import the image into the WordPress Media Library and use it as the Featured Image.
  • 500px: Value must be a search term e.g. building.  You’ll also see an additional location field, which you can specify to return an image based on the given location.
  • Alt: The alt text for the image.
    • When using a Media Library Image, the Alt text for the Media Library image is used.

Save

Once you have completed all fields, you have three options:

  1. Save: This saves the settings on the Generate screen.
  2. Test: This saves the settings on the Generate screen, and creates one test Post in draft mode.
  3. Generate: This saves the settings on the Generate screen, and generates the required number of posts.

If you have previously generated Page(s) from this Group, you will see a fourth option:

  • Delete Generated Content: This allows you to delete all existing Page(s) that were generated by this Group.  This is useful if you made an error, and need to replace your existing Pages with revised content.

Page Generation

When the Generate button is clicked, a message is displayed on screen confirming you want to generate Pages:

screen-shot-2016-12-05-at-15-24-04

Once confirmed, a screen will display showing the progress as each Page is generated.

screen-shot-2016-12-05-at-15-24-25

Note: For large volumes of keywords and use of 500px, Google, Wikipedia and Yelp shortcodes, each Page may take a few seconds or longer to generate.  This is because Page Generator Pro will convert each shortcode into actual HTML output (or, in the case of an image, import the image into the WordPress Media Library), querying 500px, Google, Wikipedia and Yelp to insert the actual content into each Page.

This results in faster loading Pages for visitors, as calls are not made to third party services every time a visitor views the Page.

To cancel Page Generation at any time, click the Stop Generation button

screen-shot-2016-12-05-at-15-25-03


Page Generation via WP-CLI

If your web host has WP-CLI installed, you can run the following commands at the command line to generate Pages:

  • page-generator-pro-test <group_id>: Group ID is the ID of the group you’ve defined settings for.  This command will behave as if you click the Test button.
  • page-generator-pro-generate <group_id>: Group ID is the ID of the group you’ve defined settings for.  This command will behave as if you click the Generate button.