Skip to main content

Overview

GEO AI provides comprehensive meta title and description management with AI-powered generation, template variables, and real-time character counting. Optimize your search engine snippets for maximum click-through rates.
Well-optimized meta titles and descriptions can improve CTR by 20-30% in search results.

Setting Title Templates

Define global templates that automatically generate titles for different content types:
1

Access Title Settings

Navigate to Settings → GEO AI → Titles & Meta
2

Configure Templates

Set templates for:
  • Post Title
  • Page Title
  • Archive Title
  • Homepage Title
3

Use Variables

Insert template variables like %%title%%, %%sitename%%, %%sep%%
4

Save Changes

Click Save Changes to activate your templates

Available Template Variables

%%title%%

Post or page title

%%sitename%%

Site name from WordPress settings

%%sep%%

Separator character (|)

%%excerpt%%

Post excerpt

%%category%%

Primary category

%%tag%%

First tag

%%date%%

Publish date

%%author%%

Author name

%%sitedesc%%

Site description/tagline

Template Examples

%%title%% %%sep%% %%sitename%%

Implementation Details

Meta Handler Class

includes/class-geoai-meta.php
class GeoAI_Meta {
    private static $instance = null;

    public static function get_instance() {
        if ( null === self::$instance ) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    private function __construct() {
        add_action( 'wp_head', array( $this, 'output_meta_tags' ), 1 );
        add_filter( 'pre_get_document_title', array( $this, 'filter_title' ), 10 );
        add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
        add_action( 'save_post', array( $this, 'save_meta_box' ) );
    }
}

Template Parser

includes/class-geoai-meta.php
private function parse_template( $template ) {
    $replacements = array(
        '%%title%%'    => get_the_title(),
        '%%sitename%%' => get_bloginfo( 'name' ),
        '%%sitedesc%%' => get_bloginfo( 'description' ),
        '%%sep%%'      => '|',
        '%%excerpt%%'  => get_the_excerpt(),
        '%%date%%'     => get_the_date(),
        '%%modified%%' => get_the_modified_date(),
        '%%id%%'       => get_the_ID(),
        '%%author%%'   => get_the_author(),
    );

    return str_replace( 
        array_keys( $replacements ), 
        array_values( $replacements ), 
        $template 
    );
}

Meta Tag Output

includes/class-geoai-meta.php
public function output_meta_tags() {
    if ( ! GeoAI_Compat::get_instance()->should_output_meta() ) {
        return;
    }

    $description = $this->get_current_description();
    $robots      = $this->get_current_robots();
    $canonical   = $this->get_current_canonical();

    if ( $description ) {
        echo '<meta name="description" content="' . esc_attr( $description ) . '" />' . "\n";
    }

    if ( $robots ) {
        echo '<meta name="robots" content="' . esc_attr( $robots ) . '" />' . "\n";
    }

    if ( $canonical ) {
        echo '<link rel="canonical" href="' . esc_url( $canonical ) . '" />' . "\n";
    }
}

AI-Powered Meta Generation

Automatically generate optimized meta titles and descriptions using Google Gemini:
1

Open Meta Box

Scroll to the GEO AI SEO meta box in the post editor
2

Click Generate

Click “Generate with AI” button
3

Wait for AI

Wait 10-15 seconds for Gemini to analyze your content
4

Review & Edit

Review the generated title and description, edit as needed
5

Save Post

Update or publish your post to save the meta data

Meta Generation Implementation

includes/class-geoai-analyzer.php
public function generate_meta_content( $post_id ) {
    $post = get_post( $post_id );
    if ( ! $post ) {
        return new \WP_Error( 'invalid_post', __( 'Post not found.', 'geo-ai' ) );
    }

    $api_key = $this->get_api_key();
    if ( empty( $api_key ) ) {
        return new \WP_Error( 'no_api_key', __( 'Google Gemini API key not configured.', 'geo-ai' ) );
    }

    // Get content preview
    $content = $this->get_rendered_content( $post );
    $content_preview = substr( $content, 0, 5000 );

    // Build prompt
    $prompt = $this->build_meta_prompt( $post->post_title, $content_preview );

    // Call API
    $response = $this->call_gemini_meta_api( $prompt, $api_key );

    if ( is_wp_error( $response ) ) {
        return $response;
    }

    return $response;
}

Meta Generation Prompt

includes/class-geoai-analyzer.php
private function build_meta_prompt( $title, $content ) {
    return sprintf(
        'You are an expert SEO copywriter. Based on the following content, generate an optimized meta title and meta description for maximum search engine and social media performance.

Guidelines:
- Meta Title: 50-60 characters, compelling, includes primary keyword, action-oriented
- Meta Description: 150-160 characters, persuasive, includes call-to-action, enticing click-through

Return ONLY a JSON object with this exact structure (no markdown, no code blocks):
{
  "title": "Your optimized meta title here",
  "description": "Your optimized meta description here"
}

Current Title: %s

Content Preview:
%s

Return the JSON now:',
        $title,
        $content
    );
}

Meta Box Interface

The post editor includes a full-featured meta box:
includes/class-geoai-meta.php
public function render_meta_box( $post ) {
    wp_nonce_field( 'geoai_meta_box', 'geoai_meta_box_nonce' );

    $title       = get_post_meta( $post->ID, '_geoai_title', true );
    $description = get_post_meta( $post->ID, '_geoai_meta_desc', true );
    $robots      = get_post_meta( $post->ID, '_geoai_robots', true );
    ?>
    <div class="geoai-meta-box">
        <div style="background: #f0f6fc; padding: 12px; border-radius: 4px;">
            <p style="margin: 0;">
                <strong><?php esc_html_e( 'AI-Powered Generation', 'geo-ai' ); ?></strong>
            </p>
            <button type="button" id="geoai-generate-meta-btn" 
                    class="button button-primary" 
                    data-post-id="<?php echo esc_attr( $post->ID ); ?>">
                <?php esc_html_e( 'Generate with AI', 'geo-ai' ); ?>
            </button>
        </div>

        <p>
            <label for="geoai_title">
                <strong><?php esc_html_e( 'SEO Title', 'geo-ai' ); ?></strong>
            </label><br/>
            <input type="text" id="geoai_title" name="geoai_title" 
                   value="<?php echo esc_attr( $title ); ?>" 
                   class="large-text" maxlength="70" />
            <p class="description">
                <?php esc_html_e( 'Optimal length: 50-60 characters', 'geo-ai' ); ?>
            </p>
        </p>
        
        <p>
            <label for="geoai_meta_desc">
                <strong><?php esc_html_e( 'Meta Description', 'geo-ai' ); ?></strong>
            </label><br/>
            <textarea id="geoai_meta_desc" name="geoai_meta_desc" 
                      rows="3" class="large-text" maxlength="165">
                <?php echo esc_textarea( $description ); ?>
            </textarea>
            <p class="description">
                <?php esc_html_e( 'Optimal length: 150-160 characters', 'geo-ai' ); ?>
            </p>
        </p>
    </div>
    <?php
}

Robots Meta Tags

Control how search engines index your content:

index, follow

Default: Allow indexing and following links (recommended for most content)

noindex, follow

Use for: Thin content, duplicate pages, thank you pages. Prevents indexing but allows link following.

index, nofollow

Use for: User-generated content, sponsored sections. Allows indexing but no link credit.

noindex, nofollow

Use for: Admin pages, login pages, private content. Prevents both indexing and link following.

Character Count Guidelines

Optimal: 50-60 characters
Maximum: 70 characters (Google’s cutoff)
Titles longer than 60 characters may be truncated in search results with ”…”
Examples:Good (55 chars):
Complete WordPress SEO Guide | Your Site Name
Too Long (78 chars):
The Ultimate Comprehensive Step-by-Step WordPress SEO Optimization Guide for Beginners
Optimal: 150-160 characters
Maximum: 165 characters (Google’s cutoff)
Examples:Good (158 chars):
Learn how to optimize WordPress for search engines with our comprehensive guide. Improve rankings, increase traffic, and boost conversions today!
Too Short (45 chars):
WordPress SEO tips and best practices.

Best Practices

Include Primary Keyword

Place your target keyword near the beginning of the title for better SEO.

Write for Humans

Make titles compelling and descriptions persuasive. CTR matters more than keyword stuffing.

Add Call-to-Action

Use action words in descriptions: “Learn”, “Discover”, “Get”, “Start”

Make Them Unique

Every page should have a unique title and description. Avoid duplicates.

Include Your Brand

Add site name to titles using %%sitename%% for brand recognition.

Match Search Intent

Align titles/descriptions with what users are searching for.

Bulk Editing

Edit meta titles and descriptions for multiple posts at once:
1

Access Bulk Editor

Navigate to Settings → GEO AI → Bulk Editor
2

Select Post Type

Choose the post type to edit (Posts, Pages, etc.)
3

Edit Inline

Modify titles and descriptions directly in the table
4

Save All Changes

Click “Save All Changes” to update all posts
Bulk editor displays 20 posts per page with pagination controls.

Canonical URLs

GEO AI automatically adds canonical URLs to prevent duplicate content issues:
<link rel="canonical" href="https://example.com/my-post/" />
Canonical URLs:
  • Point to the preferred version of a page
  • Prevent duplicate content penalties
  • Consolidate link signals to one URL
  • Generated automatically for all singular pages

Output Examples

For a blog post titled “WordPress Performance Tips”:
<head>
  <!-- Title from template: %%title%% | %%sitename%% -->
  <title>WordPress Performance Tips | My Tech Blog</title>
  
  <!-- Meta description -->
  <meta name="description" content="Discover 10 proven WordPress performance optimization techniques to reduce page load time by 50% and improve user experience." />
  
  <!-- Robots meta -->
  <meta name="robots" content="index, follow" />
  
  <!-- Canonical URL -->
  <link rel="canonical" href="https://example.com/wordpress-performance-tips/" />
</head>

Troubleshooting

Check:
  • Compatibility mode is set correctly
  • No other SEO plugin is overriding titles
  • Template syntax is correct (use %%title%% not %title%)
Cause: No API key or invalid keySolution: Configure valid Gemini API key in Settings → General
Cause: Multiple SEO plugins activeSolution: Enable Coexist Mode or disable meta output in other plugins

Social Cards

OpenGraph titles & descriptions

AI Audit

AI-powered title suggestions

Schema Markup

Structured data for search

Build docs developers (and LLMs) love