Last active
December 15, 2015 14:59
-
-
Save styledev/5278527 to your computer and use it in GitHub Desktop.
This function is a temporary fix for this wp-core bug: http://core.trac.wordpress.org/ticket/18614
This file contains 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
function wordpress_fix_bug( $wp_query ) { | |
// The function below is a temporary fix for this bug: http://core.trac.wordpress.org/ticket/18614 | |
if ( $wp_query->is_post_type_archive && $wp_query->is_tax ) { | |
global $post_type_obj; | |
$wp_query->is_tax = false; | |
$post_type_obj = get_queried_object(); | |
if (empty($post_type_obj->labels)) { | |
$post_type_obj->labels = new stdClass(); | |
$post_type_obj->labels->name = 'dev/hack to fix WordPress Bug'; | |
} | |
} | |
}add_action( 'parse_query', 'wordpress_fix_bug' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment