Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

02. Rendering your SEO Meta tags

Andrew Welch edited this page Apr 18, 2019 · 2 revisions

No Maintenance Intended

DEPRECATED

This Craft CMS 2.x plugin is no longer supported, but it is fully functional, and you may continue to use it as you see fit. The license also allows you to fork it and make changes as needed for legacy support reasons.

The Craft CMS 3.x version of this plugin can be found here: craft-seomatic and can also be installed via the Craft Plugin Store in the Craft CP.

Rendering your SEO Meta tags

All you need to do in order to output the SEOmatic SEO Meta tags is in the <head> tag of your main layout.twig (or whatever template all of your other templates extends), place this tag:

{% hook 'seomaticRender' %}

That's it. It'll render all of that SEO goodness for you.

SEOmatic uses its own internal template for rendering; but you can provide it with one of your own as well, just use this Twig code instead:

{% set seomaticTemplatePath = 'path/template' %} {% hook 'seomaticRender' %}

...and it'll use your custom template instead.

If the Minify plugin is installed, SEOmatic will minify the SEO Meta tags & JSON-LD.