Last Updated on
The Yoast SEO plugin allows you to define a template for your SEO titles and meta descriptions for all of your post types. By default, WordPress has two post types: Posts and Pages. WordPress posts and pages are both post types. This may be a little confusing to you, so for the sake of avoiding confusion, I’m going to use the term
content type instead. Going back to the topic at hand, some themes and plugins may use additional content types. For example, the Divi WordPress theme uses a Project content type and the WooCommerce plugin uses a Products content type. You can even create your own content types with the Custom Post Types UI plugin.
More on SEO Title Tags
Having different content types can make your site more organized and easier to perform SEO work on because you can specify a different template for each content type. If your website has 100 pages, imagine having to optimize each page’s SEO title and meta description manually. In this case, if you can think of a common structure for each of your content types’ SEO titles and meta descriptions, then you can get more results by defining a template that uses Yoast’s snippet variables. For example, let’s say I created the following pages with a custom content type named Services, and I used the following as the page title:
- Custom Web Design
- WordPress Development
- Drupal Site Building
- Local SEO
- National SEO
If I wanted my SEO titles to follow a certain format like so:
- Quality Custom Web Design Services in Atlanta
- Quality WordPress Development Services in Atlanta
- Quality Drupal Site Building Services in Atlanta
- Quality Local SEO Services in Atlanta
- Quality National SEO Services in Atlanta
Then this is what I would use in the Yoast SEO title section:
Quality %%title%% Services in Atlanta
You would follow the same principles when creating the meta description template.
%%sitename%% is located in Atlanta, GA and offers awesome %%title%% to small businesses nearby. Blah, blah, blah.
If Mr. Technique® were the site name, this meta description template would generate the following meta descriptions:
- Mr. Technique® is located in Atlanta, GA and offers awesome Web Design Services to small businesses nearby. Blah, blah, blah.
- Mr. Technique® is located in Atlanta, GA and offers awesome Quality WordPress Development Services to small businesses nearby. Blah, blah, blah.
- Mr. Technique® is located in Atlanta, GA and offers awesome Drupal Site Building Services to small businesses nearby. Blah, blah, blah.
- Mr. Technique® is located in Atlanta, GA and offers awesome Local SEO Services to small businesses nearby. Blah, blah, blah.
- Mr. Technique® is located in Atlanta, GA and offers awesome National SEO Services to small businesses nearby. Blah, blah, blah.
If you needed to manually create a specific page’s SEO title and meta description that you didn’t want to be like all of the rest, then you could still manually define them in the Yoast SEO section of that page in the admin area;
If all of our services were created using the page content type and there was no service content type, then defining the SEO title template for pages wouldn’t make sense on every page because non-service pages like FAQ would have SEO meta tags that would look like this:
SEO Page Title: Quality FAQ Services in Atlanta
Meta Description: Mr. Technique® is located in Atlanta, GA and offers awesome FAQ to small businesses nearby. Blah, blah, blah.
As mentioned earlier in this blog post, Divi has a custom content type called Project. This content type has two taxonomies that you could use with Yoast: Categories and Tags. Because Project is a custom content type, using %%category%% and %%tag%% will not show the projects’ categories and tags in your SEO title and meta description. To show your projects’ categories and tags, you need to use %%ct_project_category%% and %%ct_project_tag%%. The ct part of the variable stands for custom taxonomy. Learn more about using template variables for custom content type fields and taxonomies. Let’s use this Project content type SEO title template for an example:
%%ct_project_tag%% %%ct_project_category%% Project %%sep%% %%title%%
Let’s say you used an industry or type of company for your all of your projects’ tags, and you used a service for your projects’ categories. If you did, then you could generate default SEO titles like this:
- Law Firm Web Design, SEO Project • The Dickerson Firm
- Videographer Web Design Project • Helena Films
- Massage Spa Web Design, SEO Project • Treat Your Feet
- Roofing Contractor Web Design Project • Regal Restoration
- Parking Management Company Web Design, SEO Project • National Parking
Here’s what the SEO title looks like on one of our project pages:
If you were providing SEO services, and you had hundreds of projects, this could save you a ton of time. You could use city names for your projects’ categories or tags if you wanted to optimize each project for one or more areas. If you define more than one category or tag, they would all show up in the title or meta description as well.
Where to Define Templates for the SEO Title and Meta Description in the Yoast Plugin
Templates for SEO titles and meta descriptions can be done in both the free and premium version of the Yoast SEO plugin. Editing the templates can be done in the Yoast SEO -> Search Appearance -> Content Types section or you can access the section directly by going to www.yourwebsite.com/wp-admin/admin.php?page=wpseo_titles#top#post-types. Any custom content types will be added to this section:
Be sure to replace yourwebsite.com with your own website URL. You would edit the templates in this section. To edit the templates for the archive pages, you would go to the Taxonomies tab or go to www.yourwebsite.com/wp-admin/admin.php?page=wpseo_titles#top#taxonomies.
Thanks for reading this post. If you found this post informative, please feel free to share or comment below.