Skip to content
Omni SEO

Search Appearance · 5 min read

Setting up title templates

Build title and meta description templates per post type, taxonomy, author and archive using replacement variables.

A template is the default title or description used whenever a post has no manual override. Templates live in Omni SEO → Search Appearance and are set per post type, taxonomy, author archive and date archive.

Variable syntax

Variables are wrapped in single percent signs. Unknown variables are left as-is so a typo is visible rather than silently empty.

templates
Posts:      %title% %sep% %sitename%
Products:   %title% %sep% %price% %sep% %sitename%
Categories: %term% archives %sep% page %page% %sep% %sitename%
Authors:    Posts by %author% %sep% %sitename%

Commonly used variables

  • %title% — the post or term title
  • %sitename% and %sitedesc%
  • %sep% — your chosen separator character
  • %excerpt% — the excerpt, or the first sentences of the content
  • %category% / %term% / %author% / %date%
  • %page% and %pagetotal% for paginated archives
  • %price%, %sku%, %stock% for WooCommerce products

Length guides are live

The preview shows the rendered pixel width against Google's typical truncation point, and the analysis rewards titles of 30–60 characters and descriptions of 120–160.

Overriding a single post

Open the post, expand the Omni SEO panel, and edit the SEO title or meta description field. Anything you type there wins over the template. Clearing the field returns the post to the template.

Changing templates in bulk

Editing a template updates every post that relies on it immediately — no re-save needed. To change individual values across many posts, use the Bulk Editor, which shows 20 rows per screen and can be filtered to Missing meta description.

Filtering the output in code

php
add_filter( 'omniseo/title', function ( $title, $post_id ) {
    if ( 'product' === get_post_type( $post_id ) && is_on_sale( $post_id ) ) {
        return 'Sale: ' . $title;
    }
    return $title;
}, 10, 2 );