DOCUMENTATION

SEO Toolkit

Everything you need to get up and running with our SEO Toolkit plugin!

How the plugins templating engine works

For page titles and meta descriptions, the plugin implements a templating engine that works in a similar way to how shortcodes work in Wordpress.

You simply insert the tags into your page title and meta description as you wish and the plugin will replace the tag with a value. The value that is used will depend on the page being viewed.

For example, if you have a color attribute in you store, a [color] tag will be available for use in the category page title and meta description template.

When generating the page title and meta description for a category, the plugin will check to see if the user has selected a color in the layered navigation widget and will replace the tag with the value of the color chosen.

I.e. If the page title was T-Shirts: [color] the plugin would replace [color] with the color selected (e.g. Blue) giving you page title of T-Shirts: Blue.

Available tags

The tags that are available for use in the page title and meta description will vary depending on whether you are creating a template for the shop page, a category page or a product page. The available tags will always be shown below the page title and meta description fields so you will always have a reference to what is available.

See the 'Create a Page Title and Meta Description' article in the Shop, Category and Product sections for more information of the tags available.

Remember...Not all tags are available in each template, i.e. the [category] tag won't be available in the shop template or the product template since there wouldn't be any value to output.

Customising the tags output

Each tag has a set of attributes that can be used to customise the output of the tags values. These attributes work in the same way as passing values into a Wordpress shortcode. Simply specify the name of the attribute with the value like so:

[shortcode attribute_name1="attribute_value1" attribute_name2="attribute_value2" ...]

The attributes available for each tag are:

before - What to output before the value of the tag

after - What to output after the value of the tag

separator - The separator to use when multiple values are being output for this tag. Mainly used with Attribute tags. Defaults to "|".

show_parents - Only used with the [category] tag. Will also show the parents of the current category using the separator attribute to separate the category names. Use value "yes" to output the categories parents.

For example, using the tag [color before="Color:" separator=" | "] will output Color: Blue if a single value is being output or Color: Blue | Green if multiple values are being output.

The before and after attribute

As mentioned above, the before and after attribute allow you to output something before and after the tags value(s).

The reason for the before/after attribute is because in the majority of cases, you would only want something output - before or after the tag - if the tag had a value that was going to be output.

So if you had a page title like so - T-Shirts in [color] and [size], this would be fine if both a [color] and a [size] attribute were selected giving you a page title of T-Shirts in Blue and Medium. But if the user hasn't selected a [size] then you would get a page title of T-Shirts in Blue and. Notice the and at the end?

To stop this from happening, you would make use of the after tag attribute in addition to 2 additional settings that the plugin adds to further customise the before/after tag attributes.

So now if we modify the page title to T-Shirts in [color after=" and"] [size] you would still get the page title T-Shirts in Blue and Medium but now the difference being that with Don't output the after attribute for the last tag output in the template setting checked, if there is no [size] attribute selected, then the after tag attribute for the [color] tag would not be output.

This is because the plugin will detect that the [color] tag is the last tag being output in the template (and also the first in this example). If a [size] was selected, then [size] would be the last tag being output and the after tag attribute for the [color] tag would be output as normal, therefore giving you a page title that is correct.

Powered by Froala Editor