Skip to content

Instantly share code, notes, and snippets.

@joehoyle
Created September 4, 2012 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joehoyle/3627668 to your computer and use it in GitHub Desktop.
Save joehoyle/3627668 to your computer and use it in GitHub Desktop.
function jh_plugin_init() {
if ( function_exists( 'w4tc_cdn' ) )
add_action( 'load-post-new.php', '_jh_add_parse_query_action' );
}
add_action( 'init', 'jh_plugin_init' );
function _jh_add_parse_query_action() {
add_action( 'parse_query', '_jh_add_query_var_to_parse_query' );
}
function _jh_add_query_var_to_parse_query( $wp ) {
$wp->query_vars['post_type'] = 'page';
}
@GaryJones
Copy link

Typo in the filename (controved.php) :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment