Summer Sale: 50% off your first 3 months with the code summer2021. Now through August 15.

 

Yoast SEO Variables Explained

Erik Wardell

Erik is an SEO coach that loves breaking down complex SEO topics into understandable instructions anyone can follow. He thrives on helping people do what it takes to see their businesses succeed in search. Stay in touch on Twitter — @wanderinwardell.

Variables in the Yoast SEO plugin give you the power to autogenerate page titles and meta descriptions for your entire website based on a set of rules defined by content type. This is one of the many powerful tools in WordPress that make it a search engine friendly content management system.

Variables help you automate the process of creating page titles and meta descriptions that are properly formatted and information-rich. A few commonly used variables include:

%%title%% - Title of the post or page.
%%sitename%% - Name of the website.
%%excerpt%% - Excerpt of the post or page.
%%date%% - Date of the post or page.

Yoast variables act like placeholders. When a variable goes into action, it finds a piece of information, like the title of the page and it shows that instead of the naked variable…because no one wants to see %%title%%.

To Automate or Not? It Depends.

Automating page titles and meta descriptions is a powerful way to optimize WordPress websites at scale. The downside is that customization of page titles and meta descriptions typically leads to better results via on-page optimization specifically targeted to a well-researched keyword.

We recommend an optimization process that blends automation and customization. Start with automation by configuring the Yoast SEO plugin Titles & Metas at the content type level. Then, customize for top-level pages and any content ripe for driving traffic to the website.

Automation is also great for larger organizations with multiple players adding content to the website. For example, if you have multiple authors of a blog. In this instance, blog posts instantly are assigned page titles and meta descriptions which is pretty good. And then you, as the SEO expert, can jump in and overwrite them with custom page titles and meta descriptions on an as-needed basis.

Identify Important Pages

One strategy for when and how to use Yoast variables is to identify the most important pages on your website. This strategy is especially helpful for your blog.

Do you have a blog post that’s really important to you, and you really want that blog post to rank for a keyword or phrase? If so, write a unique page title and meta description for these important blog posts.

Say you have another blog post about a winter sale from 5 years ago and it’s really short, just describing the sale details. That’s a blog post that doesn’t need the special attention of an optimized page title and meta description. Leave that one to autogeneration.

Sift through the pages on your website to identify where you should devote your time, and where you can automate meta descriptions with Yoast variables.

Another Opinion – What Yoast Says about Automation

Autogenerating page titles is all good. What’s open to question, though, is whether or not to autogenerate meta descriptions using the Yoast SEO plugin. Yoast’s founder, Joost de Valk, doesn’t recommend using the Titles & Metas section to automate meta descriptions.

Why not?

According to Joost, “if you’re thinking of auto-generating the meta description, you might as well not do anything and let the search engine control the snippet.”

When you leave your meta description field empty, the search engines are more likely to pull a sentence or two from your page containing something close to the searcher’s query, if not the exact query itself. When search engines locate words or phrases similar to the searcher’s query, they display those words or phrases in bold text. This improves your visibility on the search engine results page (SERP) because not all of the results will have bold text.

Joost says depend on the search engines because autogenerated meta descriptions in the Yoast SEO plugin don’t have the intelligence (yet) to pull sentences from your page containing the searcher’s query.

When you autogenerate meta descriptions using the Yoast SEO plugin, you’re telling the search engines to grab the first 160 characters (give or take) of text on your page. Now, what’s in that first 160 characters? Probably not a keyword matching a search query, unless you’re in the habit of starting off your page copy with your keyword…not always the best idea.

But, what if you don’t want to autogenerate your meta descriptions or depend on the search engines? Well, what’s left is manually writing each of your meta descriptions. Still, depending on your website’s size, writing unique meta descriptions for every page can be time-consuming and not the best use of your time.

Here Is How to Automate Page Titles & Meta Descriptions in WordPress with the Yoast SEO Plugin

Now, how do you go about automating page titles and meta descriptions in the Yoast SEO plugin? It’s easy. But first, you need to have the Yoast SEO plugin installed.

If you have the Yoast SEO plugin installed, then we’re ready to go.

  • First, log into your WordPress website.
  • Hover over the Yoast SEO plugin in the left-hand menu, and click on Search Appearance.
  • In the first tab, General, select your title separator. The vertical line, or pipe, is most commonly used.
  • Next, click on the “Content Types” tab. This is where we’ll finally get into the variables.
  • The first content type you’ll see at the top of the page is Posts, meaning your blog posts. There are 2 fields for you to complete, SEO title and Meta description template.
    For the majority of your post types, we recommend using something like this for the Title template: %%title%% %%sep%% %%sitename%%. When these variables go to work, they’ll pull the title (%%title%%) of the page, your chosen separator (%%sep%%), and the name of your site (%%sitename%%). This is a basic variable construction, and it gets the job done.
  • To automate your meta descriptions, in the Meta description template field, type %%excerpt%%. The excerpt variable pulls the first 160 characters (give or take) of text from the page copy.
Yoast SEO content type variables

Those are some of the most basic Yoast variables. Though basic, they’re powerful and help you autogenerate page titles and meta descriptions across every page on your website. However, if the variables above don’t work with your site configuration, Yoast lets you create custom variables and variables specific to WooCommerce.

Check out all of Yoast’s variable options by visiting the Help center in the Titles & Metas section. Go to Help center > Basic Variables and Advanced Variables.

In Closing

Variables do a great job of taking lots of repetitive work off your plate. Use them to make your job easier and ensure a consistent appearance for your pages in the search results.

If you need human help getting your variables dialed in, learn about Pathfinder SEO's guided approach to SEO.

Erik Wardell

Erik is an SEO coach that loves breaking down complex SEO topics into understandable instructions anyone can follow. He thrives on helping people do what it takes to see their businesses succeed in search. Stay in touch on Twitter — @wanderinwardell.

Field Guide to SEO

An approachable and actionable guide to SEO for beginners to experts

Wordpress SEO

You Will Learn

WordPress is our favorite CMS for SEO. Learn why and how to leverage WordPress to grow your traffic.

Scroll to Top