Skip to content

Instantly share code, notes, and snippets.

@jdevalk
Created June 4, 2014 11:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jdevalk/0fd94419a3ac33d26397 to your computer and use it in GitHub Desktop.
Save jdevalk/0fd94419a3ac33d26397 to your computer and use it in GitHub Desktop.
When loading an XML sitemap, WordPress still does a number of queries for all the widgets, if I did this in WordPress SEO, do you think that'd "kill" things?
<?php
if ( isset( $_SERVER['REQUEST_URI'] ) && in_array( substr( $_SERVER['REQUEST_URI'], -4 ), array( '.xml', '.xsl' ) ) ) {
remove_all_actions( 'widgets_init' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment