TJ Kelly

Yoast WordPress SEO Titles & Metas Variables List

Before we get started…

If you’re using Yoast SEO, you’re obviously smart and interested in search & digital marketing. You may be interested in my Central MA SEO company, Mxt Media. Check us out, won’t you?

Ok, enough plug. Back to the regularly-scheduled Yoast SEO sleuthing.

[stripe html_class=”light-grey”]

Yoast’s Variables

It turns out that the WordPress SEO by Yoast variables weren’t removed. They were just moved. In my searching and head-scratching, I finally found the answer in a WordPress support forum and I thought I’d share the answer here.

Here are both lists of WordPress SEO titles and metas variables, as provided by Yoast in his plugin’s Help section. See below for screenshots.

Basic WordPress SEO Title Variables

%%date%% Replaced with the date of the post/page
%%title%% Replaced with the title of the post/page
%%sitename%% The site’s name
%%sitedesc%% The site’s tagline / description
%%excerpt%% Replaced with the post/page excerpt (or auto-generated if it does not exist)
%%excerpt_only%% Replaced with the post/page excerpt (without auto-generation)
%%tag%% Replaced with the current tag/tags
%%category%% Replaced with the post categories (comma separated)
%%category_description%% Replaced with the category description
%%tag_description%% Replaced with the tag description
%%term_description%% Replaced with the term description
%%term_title%% Replaced with the term name
%%searchphrase%% Replaced with the current search phrase
%%sep%% The separator defined in your theme’s wp_title() tag.

Advanced WordPress SEO Meta Variables

%%pt_single%% Replaced with the post type single label
%%pt_plural%% Replaced with the post type plural label
%%modified%% Replaced with the post/page modified time
%%id%% Replaced with the post/page ID
%%name%% Replaced with the post/page author’s ‘nicename’
%%userid%% Replaced with the post/page author’s userid
%%currenttime%% Replaced with the current time
%%currentdate%% Replaced with the current date
%%currentday%% Replaced with the current day
%%currentmonth%% Replaced with the current month
%%currentyear%% Replaced with the current year
%%page%% Replaced with the current page number (i.e. page 2 of 4)
%%pagetotal%% Replaced with the current page total
%%pagenumber%% Replaced with the current page number
%%caption%% Attachment caption
%%focuskw%% Replaced with the posts focus keyword
%%term404%% Replaced with the slug which caused the 404
%%cf_<custom-field-name>%% Replaced with a posts custom field value
%%ct_<custom-tax-name>%% Replaced with a posts custom taxonomies, comma separated.
%%ct_desc_<custom-tax-name>%% Replaced with a custom taxonomies description

Where’d they go?

It turns out that Yoast didn’t remove his list of title & meta variables; he relocated it. It’s now tucked away under the Help tab at the very top of the Titles & Metas screen.

[/stripe] [stripe]

Step 1: Go to the Titles & Metas screen in WordPress SEO by Yoast plugin.

Once you’re on the Titles & Metas screen, look for the Help tab at the top right of the screen. You’ll find the list of variables in the box that slides down when you click Help.

Yoast WordPress SEO titles and metas variables (1).

[/stripe] [stripe html_class=”light-grey”]

Step 2: Click Basic Variables

The basic variables, which is probably all you’ll need unless you’re doing some heavy SEO lifting, are grouped in the second tab under Help.

Yoast WordPress SEO titles and metas variables (2).

[/stripe] [stripe]

Step 3: Copy the title and meta variables you need

Chances are that you’re done after this step. In my experience, all the meta variables I’ve ever used are considered basic and live in this group.

Yoast WordPress SEO titles and metas variables (3).

[/stripe] [stripe html_class=”light-grey”]

Step 4: Advanced variables if you need them

But, if you’re a SuperSEO and want to do some crazy SEO shit, here’s your bag. Have at it, hoss.

Yoast WordPress SEO titles and metas variables (4).


38 thoughts on “Yoast WordPress SEO Titles & Metas Variables List

  1. Jared Pomranky

    I have been searching for this forever. Thank you for posting not only the variables but also where to find them. Ugh, I lost half a day trying to figure this out and test variables!

  2. Nina

    What if i want to show the next day/month/year? For example current month is “April”, this can be done easily with %%currentmonth%% but i need to show “May” which is current month + 1.

    1. TJ Kelly

      Hi Nina, thanks for your comment. Interesting question. I don’t know off the top of my head. I’ve never tried.

      Could you explain your use case? Obviously WordPress can’t show a list of posts you haven’t written yet, so I’m confused on how future dates will help you. Could you clarify?

  3. Nina

    I want to implement ‘next month’ on SEO title.

    For example this page
    has seo title: Zoolz Coupon Codes April 2014
    with title template: %%term_title%% %%currentmonth%% %%currentyear%%

    I would like to change the SEO title to: Zoolz Coupon Codes April 2014 – May 2014

    So I need to know the variable for “May”

    1. TJ Kelly

      I see! To my knowledge, there’s no way for WPSEO and its title/meta variables to do this for you. %%currentmonth%% is just a placeholder tag which tells WPSEO to look up the month.

      I think that what you’re looking for would need to use more than just title variables. I looked at your source code and it appears you’re not using a post archive page. I’m not familiar with your site’s functionality, so I could be wrong about this, but it’s unlikely that any date is associated with that coupons page. You’ll need to find a way in your theme or with a plugin to tell WordPress which month you’re looking at. Once WP knows the date, it can calculate and return ‘next month’ name.

      Alternatively, you could somehow modify or extend WPSEO to accommodate a %%nextmonth%% title variable. I don’t recommend modifying the plugin, but it would be pretty easy to generate a ‘next month’ value in your functions.php file or another plugin. I can’t say how easy it would be to access that next month name using WPSEO’s title editor. I’m not sure about that part.

  4. TJ Kelly

    @Nina, in looking a little closer, you may be able to define custom fields or custom taxonomies and then access them using Yoast’s %%cf_<custom-field-name>%% or %%ct_<custom-tax-name>%% variables. Try that! It sounds like the easiest solution if it works.

  5. autoblogcommx

    Are these all the available variables or is there a way I can use parent custom taxonomies or post types in the variables? Or also possessive names that end in plural?
    Example: Find out “parent custom category’s” “Post title” in “site name”
    I already tried in all of it’s combinations and have had no success… any ideas?

  6. Mat

    I would need to get Woocommerce product attributes through a variable.
    Seem that it would be possible using the %%ct_%% … as Attributes are custom taxonomies .. but it doesn’t work.

    I saw in another post (march 2013 – that a “woo commerce attributes are custom taxonomies, but an attribute “manufacturer” actually has a taxonomy name of pa_manufacturer”.

    Anyone has an dieia on how to get an attribute as a Yoast variable ?

  7. Fred

    I need to display my posts titles as following : ” post title + website name ” but the plugin shows ” post title + website name + site description ” , Kindly help me , which variable to use for posts ?
    Thanks in advance.

  8. Karunakar

    How to use seo variables in Meta description of a page or post?

    When I used seo variables in title it worked. But when I tried to use in meta description and keywords, it is not working.

    Am trying to use %%currentmonth%% %%currentyear%% in meta description.

    Your feedback may help.

  9. Javi


    I want to use in the tags meta description with the title of the 3 latest posts in that tag.

    Can you help me?


  10. Meicel

    i would like to know, if that possible, that the placeholder “%%currentmonth%%” display the current month in numbers, for example: “08” for August. It would be important, because the title Tag have a huge difference in length (May with 3 and september with 10! character).
    Thanks for help!

    1. TJ Kelly Post author

      Thank you for your question, Kevin. I don’t know how. I suspect it’s probably possible somehow, but I’ve never tried.

  11. Kipp

    Hey, TJ – Great (and timely) post!

    My one Q – is there a specific variable for the Yoast meta description of an individual page or blog post? I’m trying to use a WordPress plugin which currently relies on the native {excerpt} variable as the description in social media posts. Would much rather display the meta description I’ve crafted in Yoast, as we use our excerpts for something else and they’re quite long.

    Is there any way I can reference an individual post or page’s meta description via a variable?

    1. TJ Kelly Post author

      Great question, Kipp. Thanks for weighing in.

      I think you’d need some custom dev to make that happen. Shouldn’t be too hard to create a call to Yoast’s API and connect it get_post_meta() for your custom excerpt. Let me know if you want to talk further about that.

  12. Kipp

    Thanks for the thoughts, TJ. I’ll likely do the dev myself – was just wondering if anyone else had found a better option, or if anyone knew if Yoast had built one natively. Thanks!

    1. TJ Kelly Post author

      Understood. Happy trails! Let me know how it goes when you’ve finished. Maybe write your own post and share the link here? Would love to see how you did it.

  13. Mudasir Yasin

    very detailed and well explained article about Yoast SEO, but I am still confuse about the following topics in Yoast SEO, “Clean up the ” || “Add noodp meta robots tag sitewide” || “Redirect attachment URL’s to parent post URL”. These setting confuse me that what should i do for it and why so kindly explain these point’s of Yoast SEO.

    How to optimize Robots.txt file for WordPress ?? Is sitemap included is robots.txt file is important for SEO or Indexing or not ? Simple example of SEO Optimize Robots.txt file ?


Leave a Reply

Your email address will not be published. Required fields are marked *