
Yoast SEO includes powerful features to automate the generation of SEO titles and meta descriptions for WordPress and Shopify sites, using dynamic snippet variables. These snippet variables help you create consistent, well-optimized metadata for your homepage, posts, pages, taxonomies, products, and more—improving your site’s SEO with minimal manual effort.
What Are Snippet Variables?
Snippet variables are placeholders that Yoast SEO automatically replaces with relevant site or content data when generating titles and meta descriptions. For example, the variable %%title%%
shows the current post’s title, while %%sitename%%
inserts your site’s main name, minimizing maintenance and ensuring accuracy and consistency.

Types of Snippet Variables in Yoast SEO
Yoast SEO supports several variable types, making it suitable for basic blogging, advanced custom post types, WooCommerce stores, and more. Below are the key variable groups with explanations:
- Basic variables
- Advanced variables
- Custom variables
- WooCommerce variables
Yoast Basic variables
Label | Variable | Description |
---|---|---|
Date | %%date%% | Automatically replaced with the date when the post or page is published. |
Title | %%title%% | Automatically replaced with the title of the current post or page. |
Parent title | %%parent_title%% | Displays the title of the parent page of the current page, if applicable. |
Archive title | %%archive_title%% | Replaced with the standard title of an archive page generated by WordPress. |
Site title | %%sitename%% | Displays the website’s title as set in Settings > General. |
Tagline | %%sitedesc%% | Displays the website’s tagline from Settings > General. |
Excerpt | %%excerpt%% | Shows the post/page excerpt, auto-generating one if it doesn’t exist. |
Excerpt only | %%excerpt_only%% | Shows the post/page excerpt without auto-generation. |
Tag | %%tag%% | Displays the current tag or tags associated with the post/page. |
Category | %%category%% | Shows the categories assigned to the post, separated by commas. |
Primary category | %%primary_category%% | Displays the primary category of the post or page. |
Category description | %%category_description%% | Shows the description for the assigned category. |
Tag description | %%tag_description%% | Shows the description for the assigned tag. |
Term description | %%term_description%% | Displays the description of the current taxonomy term. |
Term title | %%term_title%% | Displays the name of the current taxonomy term. |
Search phrase | %%searchphrase%% | Displays the search phrase entered by the user. |
Separator | %%sep%% | Inserts the separator defined in your theme’s wp_title() function. |
Yoast Advanced Variables
The following variables are more advanced and require a solid understanding of SEO. If you’re not confident in using them, it’s recommended to avoid applying these variables.
Label | Variable | Description |
---|---|---|
Post type (singular) | %%pt_single%% | Displays the singular label of the content type for the post or page. |
Post type (plural) | %%pt_plural%% | Displays the plural label of the content type for the post or page. |
Modified | %%modified%% | Shows the date and time when the post or page was last modified. |
ID | %%id%% | Outputs the unique ID assigned to the post or page. |
Name | %%name%% | Displays the author’s “nicename” of the post or page. |
User description | %%user_description%% | Shows the biographical information of the post/page author. |
Page number | %%page%% | Displays the current page number along with context (e.g., page 2 of 4). |
Pagetotal | %%pagetotal%% | Shows the total number of pages for the post or page. |
Pagenumber | %%pagenumber%% | Displays the current page number only. |
Caption | %%caption%% | Outputs the caption of an attached media file. |
Focus keyword | %%focuskw%% | Shows the focus keyphrase for the post. |
Term404 | %%term404%% | Displays the slug that caused a 404 error. |
(custom field) | %%cf_%% | Outputs the value of a custom field for the post; remove the <>. |
(custom taxonomy) | %%ct_%% | Displays custom taxonomy terms for the post, separated by commas; remove the <>. |
description (custom taxonomy) | %%ct_desc_%% | Outputs the description of a custom taxonomy; remove the <>. |
Yoast Custom Variables
The final three advanced variables let you pull data from non-standard WordPress elements, such as WooCommerce products. But how do you know which field or taxonomy name to use with these variables?
Custom Fields
To locate a custom field name, follow the steps provided [here]. Once you identify the field name, replace <custom-field-name>
with it.
- Example 1: If the custom field is named
myfield
, the variable will be:%%cf_myfield%%
- Example 2: If the custom field starts with an underscore (e.g.,
_anotherfield
), keep the underscore in the variable:%%cf__anotherfield%%
Note: Custom fields that store arrays (lists of related values) cannot be used directly with the %%cf_%%
variable. In such cases, you or your developer will need to create custom template variables.
Custom Taxonomies
You can find the name of a custom taxonomy in the URL of your WordPress backend while editing it.
- Example URL:
edit-tags.php?taxonomy=mycategory&post_type=myposttype
In this example:
- The custom taxonomy is mycategory
- The custom post type is myposttype
To display all categories assigned to a myposttype
page, you would use:
%%ct_mycategory%%
To output the description of a specific taxonomy (e.g., mycategory
) on its archive page, you would use:
%%ct_desc_mycategory%%
Yoast WooCommerce variables
The variables listed below are examples you can use with WooCommerce. If you don’t see the exact variable you need, refer to the custom variable section above to locate or create the correct one.
Placeholder | Description |
---|---|
%%ct_product_cat%% | Product category (comma separated) |
%%ct_product_tag%% | Product tag (comma separated) |
%%ct_pa_<product-attribute-slug>%% | Product attribute (comma separated). Remove the < > when using the slug |
Yoast WooCommerce SEO variables
When you are using our Yoast WooCommerce SEO plugin, these additional variables are available:
Variable | Description |
---|---|
%%wc_shortdesc%% | Displays the short description of the product. Available from Yoast WooCommerce SEO 6.2 onwards. |
%%wc_sku%% | Shows the inventory stock-keeping unit (SKU) of the product. Available from Yoast WooCommerce SEO 6.2 onwards. |
%%wc_brand%% | Outputs the brand name of the product. Works only with ‘WooCommerce Brands’ or ‘Perfect WooCommerce Brands’ plugins. Available from Yoast WooCommerce SEO 6.2 onwards. |
%%wc_price%% | Displays the price of the product. Available from Yoast WooCommerce SEO 6.2 onwards. |
Yoast Deprecated Variables in WordPress
As of Yoast version 7.7, the following variables have been deprecated due to a lack of valid use cases. If you use them in the snippet editor, they will no longer appear in the snippet preview. However, they will still be rendered in your site’s source code for backward compatibility. We recommend avoiding these variables going forward.
Placeholder | Description |
---|---|
%%userid%% | Replaced with the post/page author’s user ID. |
%%currenttime%% | Replaced with the current time in HH:MM:SS format. |
%%currentdate%% | Replaced with the current date in DD/MM/YYYY format. |
%%currentday%% | Replaced with the current day of the week (e.g., Monday). |
%%currentmonth%% | Replaced with the current month (e.g., September). |
%%currentyear%% | Replaced with the current year (e.g., 2025). |
Yoast Default Variables in WordPress
If you’d like to reset the SEO title template variables to their default settings, use the options below. For meta descriptions, the default is left blank. You can set these default titles in the SEO → Search Appearance section, which will then apply them as the global template variables for that section.
Title Template | Description |
---|---|
%%title%% %%page%% %%sep%% %%sitename%% | Displays Posts, Pages, Products, Media, and other Custom Post Types |
%%pt_plural%% Archive %%page%% %%sep%% %%sitename%% | Archive pages for Posts, Products, and other Custom Post Types |
%%term_title%% Archives %%page%% %%sep%% %%sitename%% | Archive pages for Taxonomies (categories, tags, etc.) |
You searched for %%searchphrase%% %%page%% %%sep%% %%sitename%% | Special page showing search results for user queries |
Page Not Found %%sep%% %%sitename%% | 404 error page displayed when content is not found |
%%name%%, Author at %%sitename%% %%page%% | Author archive page showing posts by a specific author |
%%date%% %%page%% %%sep%% %%sitename%% | Date-based archive page displaying posts from a specific day, month, or year |
The post %%POSTLINK%% appeared first on %%BLOGLINK%% | RSS feed item showing the original post link |
%%sitename%% %%page%% %%sep%% %%sitedesc%% | Homepage template displaying site title, page number, and description |
How to Create Custom Template Variables in WordPress for Yoast SEO
Adding your own template variables can be done using the wpseo_register_extra_replacements
filter in your functions.php file. An example of how to use the filter can be viewed here.
You might not want Yoast to show these Yoast-created titles. In that case, you can use these filters here.
Available Yoast Snippet Variables in Shopify
The Yoast SEO app for Shopify provides the following snippet variables for dynamic titles and meta descriptions.
Label | Variable | Description |
---|---|---|
Title | %%title%% | Automatically replaced with the blog post, product, or collection title. |
Focus keyphrase | %%focus_keyphrase%% | Inserts the main keyword or keyphrase for the post/page. |
Product variant | %%product_variant%% | Displays the specific name of the product variant. |
Page number | %%page_number%% | Shows the number of the current page. |
Separator | %%sep%% | Inserts the site’s default separator. |
Site title | %%sitename%% | Displays the name of your website. |
Blog title | %%blog_title%% | Replaced with the title of the blog the post belongs to. |
Collection title | %%collection_title%% | Shows the title of the collection for the product/page. |
Product/post tags | %%tag%% | Inserts the current tag or tags for the post/product. |
Product vendor | %%vendor%% | Displays the brand or supplier of the product (Shopify vendor field). |
Shopify page title | %%shopify_seo_title%% | Shopify’s native SEO title for the product/page. |
Shopify meta description | %%shopify_seo_description%% | Shopify’s native SEO meta description for the product/page. |
Product availability | %%availability%% | Shows whether the product is ‘In Stock’ or ‘Out Of Stock’. |
Product SKU | %%sku%% | Displays the SKU of the product. |
Product barcode | %%barcode%% | Shows the barcode of the product. |
Product Price | %%price%% | Displays the default price of the product. |
Minimum price of a variable product | %%price_min%% | Shows the minimum price of a variable product. |
Maximum price of a variable product | %%price_max%% | Shows the maximum price of a variable product. |
Final Conclusion
In conclusion, using snippet variables in Yoast SEO is a highly effective way to automate and optimize your site’s SEO titles and meta descriptions across WordPress, Shopify, and WooCommerce platforms. By leveraging these dynamic placeholders, you ensure your metadata remains consistent, accurate, and easy to update, even as your site content grows or changes. Whether you stick to the robust default variable templates or customize them—with standard or even custom fields—Yoast SEO empowers users of all skill levels to achieve strong on-page SEO and save valuable development time. For best results, regularly review available variables in the Yoast SEO documentation so your templates always reflect the latest capabilities and SEO best practices.