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".


Top ↑

Source

File: wp-includes/functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More