Last active
December 24, 2015 08:29
-
-
Save kingkool68/6771010 to your computer and use it in GitHub Desktop.
Add sitemap links to your robots.txt file using the BWP Google Sitemap Plugin for WordPress.
This file contains hidden or 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
//BWP Google Sitemap Plugin doesn't add sitemap links to robots.txt files so I guess I'll do it myself... | |
function pew_add_sitemap_urls_to_robots_txt() { | |
echo "\nSitemap: " . get_site_url() . "/sitemap.xml"; | |
echo "\nSitemap: " . get_site_url() . "/post_google_news.xml"; | |
echo "\n\n"; | |
return $txt; | |
} | |
add_action( 'do_robotstxt', 'pew_add_sitemap_urls_to_robots_txt' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment