Replace Variables Reference
Replace variables let you insert dynamic content into SEO titles, descriptions, and other fields using simple placeholders. Use them in title templates, description templates, image SEO formats, and anywhere else the variable picker appears.
Variable syntax
Section titled “Variable syntax”Variables use the %variable% format:
- Basic:
%sitename%,%title%,%sep% - With arguments:
%date(F jS, Y)%,%customfield(field_name)%
The variable picker in the post editor and settings pages shows all available variables with descriptions and examples.
Basic variables
Section titled “Basic variables”Separator character as configured in settings (default: -).
Example: My Post %sep% Site Name → My Post - Site Name
%sitename%
Section titled “%sitename%”Site title from Settings > General.
Example: %title% %sep% %sitename% → My Post - My Site
%sitedesc%
Section titled “%sitedesc%”Site tagline from Settings > General.
Example: %sitedesc% → Just another WordPress site
%currentdate%
Section titled “%currentdate%”Current server date in the format configured in Settings > General.
Example: Published on %currentdate% → Published on January 15, 2025
%currentday%
Section titled “%currentday%”Current day of the month (numeric).
Example: %currentday% → 15
%currentmonth%
Section titled “%currentmonth%”Current month name.
Example: %currentmonth% → January
%currentyear%
Section titled “%currentyear%”Current year.
Example: Copyright %currentyear% → Copyright 2025
%currenttime%
Section titled “%currenttime%”Current server time in the format configured in Settings > General.
Example: Updated at %currenttime% → Updated at 3:45 PM
%currenttime(format)%
Section titled “%currenttime(format)%”Current time with custom format (uses PHP date format).
Example: %currenttime(F jS, Y)% → January 15th, 2025
%search_query%
Section titled “%search_query%”Search query text (only available on search results pages).
Example: Results for: %search_query% → Results for: wordpress seo
Post variables
Section titled “Post variables”%title%
Section titled “%title%”Post or page title.
Example: %title% %sep% %sitename% → My Post - My Site
%parent_title%
Section titled “%parent_title%”Parent page title (for hierarchical post types).
Example: %parent_title% %sep% %title% → Parent Page - Child Page
%excerpt%
Section titled “%excerpt%”Post excerpt, auto-generated from content if missing.
Example: %excerpt% → This is a brief summary of the post content...
%excerpt_only%
Section titled “%excerpt_only%”Post excerpt without auto-generation (returns empty if no manual excerpt).
Example: %excerpt_only% → Returns empty if no manual excerpt exists
%seo_title%
Section titled “%seo_title%”Custom SEO title from meta box, or the post title if not set.
Example: %seo_title% → Uses your custom SEO title
%seo_description%
Section titled “%seo_description%”Custom SEO description from meta box, or excerpt if not set.
Example: %seo_description% → Uses your custom SEO description
Permalink URL of the current post or page.
Example: Read more: %url% → Read more: https://example.com/my-post
%post_thumbnail%
Section titled “%post_thumbnail%”Featured image URL of the current post.
Example: Image: %post_thumbnail% → Image: https://example.com/wp-content/uploads/image.jpg
%date%
Section titled “%date%”Publication date of the current post.
Example: Published %date% → Published January 15, 2025
%modified%
Section titled “%modified%”Last modification date of the current post.
Example: Updated %modified% → Updated January 20, 2025
%date(format)%
Section titled “%date(format)%”Publication date with custom format (uses PHP date format).
Example: %date(F jS, Y)% → January 15th, 2025
%modified(format)%
Section titled “%modified(format)%”Modification date with custom format.
Example: %modified(F jS, Y)% → January 20th, 2025
%category%
Section titled “%category%”First category assigned to the post.
Example: %category% %sep% %title% → Technology - My Post
%categories%
Section titled “%categories%”Comma-separated list of all categories.
Example: Categories: %categories% → Categories: Technology, News, Updates
First tag assigned to the post.
Example: Tagged: %tag% → Tagged: wordpress
%tags%
Section titled “%tags%”Comma-separated list of all tags.
Example: Tags: %tags% → Tags: wordpress, seo, tutorial
Term variables
Section titled “Term variables”%term%
Section titled “%term%”Current term name (category, tag, or custom taxonomy).
Example: %term% Archive → Technology Archive
%term_description%
Section titled “%term_description%”Current term description.
Example: %term_description% → Posts about technology and web development
%customterm(taxonomy)%
Section titled “%customterm(taxonomy)%”Custom term value from a specific taxonomy.
Example: %customterm(product_category)% → Returns the product category term
%customterm_desc(taxonomy)%
Section titled “%customterm_desc(taxonomy)%”Custom term description from a specific taxonomy.
Example: %customterm_desc(product_category)% → Returns the product category description
Author variables
Section titled “Author variables”%userid%
Section titled “%userid%”Author user ID of the current post or author archive.
Example: Author ID: %userid% → Author ID: 42
%name% or %post_author%
Section titled “%name% or %post_author%”Display name of the current post author.
Example: By %name% → By John Doe
%user_description%
Section titled “%user_description%”Biographical info of the current post author.
Example: %user_description% → John is a WordPress developer...
Advanced variables
Section titled “Advanced variables”Post or page ID.
Example: Post #%id% → Post #123
%focuskw%
Section titled “%focuskw%”Focus keyword of the current post.
Example: Keyword: %focuskw% → Keyword: wordpress seo
%keywords%
Section titled “%keywords%”All focus keywords of the current post (comma-separated).
Example: Keywords: %keywords% → Keywords: wordpress, seo, plugin
%customfield(field_name)%
Section titled “%customfield(field_name)%”Value of a custom field by field name.
Example: %customfield(price)% → Returns the value of the price custom field
%page%
Section titled “%page%”Page number with context (e.g., “Page 2 of 4”). Only appears on page 2+.
Example: %title% %page% → My Post - Page 2 of 4
%pagenumber%
Section titled “%pagenumber%”Current page number.
Example: Page %pagenumber% → Page 2
%pagetotal%
Section titled “%pagetotal%”Total number of pages.
Example: of %pagetotal% → of 4
%pt_single%
Section titled “%pt_single%”Singular name of the current post type.
Example: %pt_single% Archive → Post Archive or Product Archive
%pt_plural%
Section titled “%pt_plural%”Plural name of the current post type.
Example: Latest %pt_plural% → Latest Posts or Latest Products
%filename%
Section titled “%filename%”Image filename without extension (used in Image SEO alt format).
Example: %filename% → my-image
Where to use variables
Section titled “Where to use variables”Title templates
Section titled “Title templates”Go to SEOvault AI > General > Templates to set default title templates for posts, pages, and other post types.
Example template: %title% %sep% %sitename%
Description templates
Section titled “Description templates”Set default description templates in the Templates tab.
Example template: %excerpt% %sep% %sitename%
Image SEO alt format
Section titled “Image SEO alt format”Configure automatic alt text generation in the Image SEO tab.
Example format: %filename% %sep% %sitename%
Post editor
Section titled “Post editor”Use the variable picker in the SEO meta box to insert variables into custom titles and descriptions.
Term SEO
Section titled “Term SEO”Use variables in category and tag SEO titles and descriptions.
Custom variables
Section titled “Custom variables”Developers can register custom variables using the seovaultseo/vars/register_extra action hook. This allows for site-specific variables like custom post type data, plugin-specific values, or any other dynamic content.