Customize llms.txt eligibility
The modern llms.txt module exposes filters for developers who need to refine whether an administrator-selected resource is eligible for the generated index. Enable it under Settings → POM Tweaks → SEO & LLMs → LLMs.txt before testing them.
Post eligibility
apply_filters(
'pom_tweaks_llms_is_post_eligible',
bool $eligible,
WP_Post $post,
string $url
);
The default checks published, password-free, publicly viewable content, a usable URL, supported SEO noindex values, and conflicting canonical URLs.
Term eligibility
apply_filters(
'pom_tweaks_llms_is_term_eligible',
bool $eligible,
WP_Term $term,
string $url
);
The default requires a term with at least one assigned object, a usable URL, and no supported SEO noindex or conflicting canonical value.
Post-type archive eligibility
apply_filters(
'pom_tweaks_llms_is_post_type_archive_eligible',
bool $eligible,
string $post_type,
string $url
);
The default requires a usable archive URL and respects the supported Rank Math archive-indexability check when available.
Cache lifetime
apply_filters( 'pom_tweaks_llms_cache_ttl', DAY_IN_SECONDS );
Return an integer number of seconds. POM Tweaks enforces a minimum of 60 seconds. Content and settings changes can invalidate the cached response before that duration expires.
Example
add_filter(
'pom_tweaks_llms_is_post_eligible',
static function ( bool $eligible, WP_Post $post, string $url ): bool {
if ( ! $eligible ) {
return false;
}
return ! has_term( 'private-resource', 'category', $post );
},
10,
3
);
Preserve an existing false result unless the integration deliberately replaces the module’s publication, SEO, and canonical checks. After changing eligibility, save an affected resource or the module settings, then request /llms.txt signed out.
See Choose content for llms.txt for the administrator-facing selection rules.