Video-related post meta for VideoObject schema and video sitemap. PRO feature.
| Meta Key | Type | Description |
|---|---|---|
_seoforge_videos | string (JSON) | Auto-detected videos array. Populated automatically on save_post. |
_seoforge_video_url | string | Manual video URL override. Takes priority over auto-detected videos. |
_seoforge_video_thumbnail | string | Manual thumbnail URL for the video. |
_seoforge_video_duration | string | Duration in ISO 8601 format (e.g. PT5M30S for 5 minutes 30 seconds). |
_seoforge_video_description | string | Video description used in VideoObject schema and video sitemap. |
php
// ----- Reading video meta -----
$post_id = 42;
$videos_json = get_post_meta( $post_id, '_seoforge_videos', true );
$videos = $videos_json ? json_decode( $videos_json, true ) : [];
// Each video: [ 'platform' => 'youtube', 'id' => 'dQw4w9WgXcQ', 'url' => '...', 'embed_url' => '...', 'thumbnail' => '...' ]
$manual_url = get_post_meta( $post_id, '_seoforge_video_url', true );
$thumbnail = get_post_meta( $post_id, '_seoforge_video_thumbnail', true );
$duration = get_post_meta( $post_id, '_seoforge_video_duration', true );
$description = get_post_meta( $post_id, '_seoforge_video_description', true );php
// ----- Writing video meta -----
$post_id = 42;
update_post_meta( $post_id, '_seoforge_video_url', 'https://www.youtube.com/watch?v=abc123' );
update_post_meta( $post_id, '_seoforge_video_thumbnail', 'https://example.com/thumbnails/video-abc123.jpg' );
update_post_meta( $post_id, '_seoforge_video_duration', 'PT10M15S' );
update_post_meta( $post_id, '_seoforge_video_description', 'A comprehensive tutorial on WordPress SEO.' );
// Remove manual video override (fall back to auto-detected)
delete_post_meta( $post_id, '_seoforge_video_url' );
// Force re-detection of videos in post content
SEOFORGE_Video_Seo::instance()->auto_detect_videos( $post_id, get_post( $post_id ) );Taxonomy Term Meta
SEO Forge supports noindex and nofollow on taxonomy terms (categories, tags, and custom taxonomies):
php
$term_id = 15;
// Mark category archive as noindex
update_term_meta( $term_id, '_seoforge_noindex', '1' );
update_term_meta( $term_id, '_seoforge_nofollow', '1' );
// Read values
$is_noindex = get_term_meta( $term_id, '_seoforge_noindex', true ) === '1';
// Bulk noindex all empty categories
$categories = get_categories( [ 'hide_empty' => false ] );
foreach ( $categories as $cat ) {
if ( $cat->count === 0 ) {
update_term_meta( $cat->term_id, '_seoforge_noindex', '1' );
}
}—