Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

GaryJones commented Nov 14, 2012

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.