Support Log in

2. Core Meta Fields

Developer Guide
Prefer video? Watch the Rank Forge tutorials 9 short guides covering every feature Watch

These are the fundamental SEO fields stored on every post/page as standard WordPress post_meta with the _rankforge_ prefix.

Meta KeyTypeDescription
_rankforge_meta_titlestringCustom SEO title override. When set, bypasses the template system entirely.
_rankforge_meta_descriptionstringCustom meta description override. Maximum recommended length: 160 characters.
_rankforge_focus_keywordstringFocus keyword used for on-page analysis. Used by the content scorer and internal link suggestions.
_rankforge_noindexstring ('1' or '')When '1', adds noindex to the robots meta tag and excludes from sitemap.
_rankforge_nofollowstring ('1' or '')When '1', adds nofollow to the robots meta tag.
php
// ----- Reading core meta -----

$post_id = 42;

// Read the custom SEO title (returns empty string if not set)
$title = get_post_meta( $post_id, '_rankforge_meta_title', true );

// Read the meta description
$desc = get_post_meta( $post_id, '_rankforge_meta_description', true );

// Read the focus keyword
$keyword = get_post_meta( $post_id, '_rankforge_focus_keyword', true );

// Check if the post is set to noindex
$is_noindex  = get_post_meta( $post_id, '_rankforge_noindex', true ) === '1';
$is_nofollow = get_post_meta( $post_id, '_rankforge_nofollow', true ) === '1';
php
// ----- Writing core meta -----

$post_id = 42;

// Set a custom SEO title (overrides template system)
update_post_meta( $post_id, '_rankforge_meta_title', 'Best WordPress SEO Plugin 2024 | MyBlog' );

// Set a meta description (keep under 160 chars for best results)
update_post_meta(
    $post_id,
    '_rankforge_meta_description',
    'Complete guide to optimizing your WordPress site for search engines. Covers on-page SEO, schema markup, and performance tips.'
);

// Set focus keyword (used in scoring analysis)
update_post_meta( $post_id, '_rankforge_focus_keyword', 'wordpress seo' );

// Enable noindex (hide from search engines)
update_post_meta( $post_id, '_rankforge_noindex', '1' );

// Remove noindex (make visible to search engines again)
update_post_meta( $post_id, '_rankforge_noindex', '' );

Example: bulk-setting meta descriptions from an external CSV import:

php
$csv_data = [
    42 => 'Learn WordPress SEO techniques that actually work in 2024.',
    55 => 'Step-by-step guide to WooCommerce product page optimization.',
    78 => 'How to set up Google Search Console for your WordPress site.',
];

foreach ( $csv_data as $post_id => $description ) {
    if ( get_post_status( $post_id ) === 'publish' ) {
        update_post_meta( $post_id, '_rankforge_meta_description', sanitize_text_field( $description ) );
        RANKFORGE_Analyzer::instance()->analyze( $post_id );
    }
}

Forge AI Assistant Online

Hi! I'm the Rank Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs