Menu

Yoast WordPress SEO Titles & Metas Variables List

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.

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).

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).

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).

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).

18 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.

  3. 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?

  4. Nina

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

    For example this page http://couponbeing.com/stores/zoolz-coupon-codes/
    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”

  5. 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.

  6. 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.

  7. 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?

  8. 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 – http://wpquestions.com/question/show/id/7532) 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 ?

  9. 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.

Leave a Reply