Ping Webmaster tools
-
This plugin has a big problem: it does not ping the googlebot via Webmaster tools.
The code below will help ping it but should be on publish_post action or something like it.
$base = $GLOBALS['wp_rewrite']->using_index_permalinks() ? 'index.php/' : ''; $sitemapurl = urlencode( home_url( $base . 'sitemap.xml' ) ); wp_remote_get( 'https://www.google.com/webmasters/tools/ping?sitemap=' . $sitemapurl );
The code is not for multisite!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Ping Webmaster tools’ is closed to new replies.