Skip to content

Instantly share code, notes, and snippets.

@webium
Last active August 29, 2015 14:04
Show Gist options
  • Save webium/9ae974290409c22d3b1d to your computer and use it in GitHub Desktop.
Save webium/9ae974290409c22d3b1d to your computer and use it in GitHub Desktop.
Wordpress - Yoast Plugin Title & Meta Variables

Basic

  • %%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

  • %%pt_single%% Replaced with the post type single label
  • %%pt_plural%% Replaced with the post type plural label
  • %%caption%% Attachment caption
  • %%focuskw%% Replaced with the posts focus keyword
  • %%term404%% Replaced with the slug which caused the 404

Time

  • %%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 Counts and Numbers

  • %%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

Custom

  • %%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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment