⚡ One-Minute “Theme-Only” Method
If you’d rather skip plugins and just drop a few lines into your theme, here’s the ultra-light path. You only need to edit one file—functions.php (ideally in a child theme so updates don’t erase your changes).
1. Open
wp-content/themes/<your-child-theme>/functions.php
Append this entire block at the bottom:
/* ────────── AI-FRIENDLY TAGS & SCHEMA ────────── */
function ek_add_ai_meta() {
// Standard robots directive
echo “\n<!– Indexable-AI META –>\n”;
echo ‘<meta name=”robots” content=”index,follow”>’ . “\n”;
// Explicit invites to AI crawlers
echo ‘<meta name=”GPTBot” content=”allow”>’ . “\n”;
echo ‘<meta name=”openai-crawler” content=”allow”>’ . “\n”;
// Rich Article JSON-LD for single posts/pages
if ( is_singular() ) {
$post = get_post();
$headline = esc_attr( get_the_title( $post ) );
$desc_src = has_excerpt( $post ) ? get_the_excerpt( $post ) :
wp_strip_all_tags( wp_trim_words( $post->post_content, 55 ) );
$desc = esc_attr( $desc_src );
$url = esc_url( get_permalink( $post ) );
$published = get_the_date( DATE_W3C, $post );
$modified = get_the_modified_date( DATE_W3C, $post );
$author = esc_attr( get_the_author_meta( ‘display_name’, $post->post_author ) );
$schema = [
‘@context’ => ‘https://schema.org’,
‘@type’ => ‘Article’,
‘headline’ => $headline,
‘description’ => $desc,
‘url’ => $url,
‘datePublished’ => $published,
‘dateModified’ => $modified,
‘author’ => [
‘@type’ => ‘Person’,
‘name’ => $author,
],
];
echo ‘<script type=”application/ld+json”>’ .
wp_json_encode( $schema ) .
‘</script>’ . “\n”;
}
}
add_action( ‘wp_head’, ‘ek_add_ai_meta’ );
/* Add GPTBot allowance to robots.txt */
function ek_allow_gptbot( $output, $public ) {
$output .= “\nUser-agent: GPTBot\nAllow: /\n”;
return $output;
}
add_filter( ‘robots_txt’, ‘ek_allow_gptbot’, 10, 2 );
/* ────────── END AI BLOCK ────────── */
2. Save & Upload
- If editing locally, upload functions.php via SFTP.
- Or use Appearance → Theme File Editor in the WP dashboard.
3. Victory Check
- Visit any post, view page source—look for <!– Indexable-AI META –>.
- Hit example.com/robots.txt—you should see:
User-agent: GPTBot
Allow: /
Why This Rocks
- Zero plugins = nothing else to update or slow down.
- Hooks (wp_head, robots_txt) make it future-proof and clean.
- Drop-in code—copy, paste, done in 60 seconds.
Pro tip: Keep this in a child theme so core theme updates never nuke your hard-won AI mojo. 🚀