public
Last active

This function is a temporary fix for this wp-core bug: http://core.trac.wordpress.org/ticket/18614

  • Download Gist
Wordpress-Bug-Fix.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12
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' );

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.