WordPress filter hook · part of WordPress core
wp_robots
A WordPress core filter that 20 plugins also fire themselves, running on 31K+ sites between them.
“This filter is documented in wp-includes/robots-template.php”
How to use wp_robots
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'wp_robots', function( $robots ) {
// Change $robots here.
return $robots;
}, 10, 1 );Argument names come from LinkMesh: Semantic AI Internal Links for SEO's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
20 plugins that fire wp_robots
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
ThinkRank SEO20,000+ installs
apply_filters( 'wp_robots', [] )includes/frontend/class-seo-manager.php:1433 -
Nexter Extension10,000+ installs
apply_filters( 'wp_robots', array() )include/panel-settings/extensions/content-seo/class-seo-robots.php:158 -
LLM Markdown800+ installs
apply_filters( 'wp_robots', [] )includes/class-plugin.php:630 -
LinkMesh: Semantic AI Internal Links for SEO90+ installs
apply_filters( 'wp_robots', $robots )modules/llms-txt/class-ailm-llmstxt-generator.php:538 -
Ostheimer SEO50+ installs
apply_filters( 'wp_robots', array() )src/Frontend/Robots.php:48 -
Stedica SEO10+ installs
apply_filters( 'wp_robots', [] )includes/class-head-output.php:952 -
Schema Markup for Medical Business10+ installs
apply_filters( 'wp_robots', array() )src/Schema/PageContextResolver.php:91 -
Noshi-KanamerFewer than 10 installs
apply_filters( 'wp_robots', array() )noshi-kanamer.php:843 -
AriSEOFewer than 10 installs
apply_filters( 'wp_robots', array() )includes/class-ariseo-headless.php:345 -
Baza HelperFewer than 10 installs
apply_filters( 'wp_robots', array() )includes/admin/admin-bar.php:80 -
TamRank SEOFewer than 10 installs
apply_filters( 'wp_robots', array() )tam-rank.php:1649 -
Contentrain BridgeFewer than 10 installs
apply_filters( 'wp_robots', array() )includes/class-contentrain-bridge-seo.php:236 -
Multipify SEO BoostFewer than 10 installs
apply_filters( 'wp_robots', [] )includes/class-v53-monitoring.php:169 -
Gonzales AI Agent MarkdownFewer than 10 installs
apply_filters( 'wp_robots', array() )includes/Eligibility.php:16 -
Anand Bajrangi SEOFewer than 10 installs
apply_filters( 'wp_robots', array() )src/SEO/CanonicalModule.php:57 -
WGD SEOFewer than 10 installs
apply_filters( 'wp_robots', array() )src/Robots/Robots_Service.php:206 -
Staging ShieldFewer than 10 installs
apply_filters( 'wp_robots', array( 'index' => true, 'follow' => true ) )includes/class-sshield-autoprueba.php:352 -
Livada SEO LiteFewer than 10 installs
apply_filters( 'wp_robots', $seed )includes/class-meta.php:368 -
Site CurrentFewer than 10 installs
apply_filters( 'wp_robots', [] )includes/class-aifq-sr-next-search-visibility-evidence-producer.php:46 -
CannyForge HreflangFewer than 10 installs
apply_filters( 'wp_robots', array(), 'index' )includes/class-cannyforge-hreflang-repository.php:372
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.