Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
This function is a temporary fix for this wp-core bug:
function wordpress_fix_bug( $wp_query ) {
// The function below is a temporary fix for this bug:
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