robots_txt WordPress Filter Hook
The robots_txt hook allows you to modify the robots.txt file for your Wordpress site. This can be useful if you want to change the way that search engines crawl your site, or if you want to block certain pages from being indexed.
apply_filters( 'robots_txt', string $output , bool $public ) #
Filters the robots.txt output.
Parameters
- $output
(string)The robots.txt output.
- $public
(bool)Whether the site is considered "public".
Source
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |