Last active
July 27, 2022 03:29
-
-
Save bobbydank/d525a594e65c53e059ca24e638ca9d93 to your computer and use it in GitHub Desktop.
simple function for adding extra stuff to your Wordpress site's robots.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* author: Robert Danklefsen | |
* website: https://www.catchylabs.com/ | |
* | |
* simple function for adding extra stuff to your Wordpress site's robots.txt | |
* add to functions.php | |
*/ | |
function catchylabs_addToRoboText($robotext) { | |
$additions = " | |
# Additions | |
Disallow: /folder/ | |
"; | |
return $robotext . $additions; | |
} | |
add_filter('robots_txt', 'catchylabs_addToRoboText'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment