-
-
Save anonymous/103361fe986b9626e91a to your computer and use it in GitHub Desktop.
Sample code with your fix.
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
<?php | |
global $oswcPostTypes; | |
//this is the folder that houses the function files to include | |
define('functions', TEMPLATEPATH . '/functions'); | |
function fixObject (&$object) | |
{ | |
if (!is_object ($object) && gettype ($object) == 'object') | |
return ($object = unserialize (serialize ($object))); | |
return $object; | |
} | |
$lang = TEMPLATEPATH . '/lang'; | |
load_theme_textdomain('swagger', $lang); | |
//Get the post type functions | |
require_once(functions . '/oswc-post-types.php'); | |
//Get the theme options | |
require_once(functions . '/theme-options.php'); | |
//Get the review options | |
require_once(functions . '/review-options.php'); | |
//Get the widgets | |
require_once(functions . '/widgets.php'); | |
//Get the custom functions | |
require_once(functions . '/custom.php'); | |
//Get the shortcodes | |
require_once(functions . '/shortcodes.php'); | |
//Get the post type functions | |
require_once(functions . '/post-types.php'); | |
//Get the post & page meta boxes | |
require_once(functions . '/meta-boxes.php'); | |
//notifies users of updates | |
require('update-notifier.php'); | |
<?php | |
add_action( 'parse_query', 'tribe_fix_tag_query' ); | |
function tribe_fix_tag_query( $query ) { | |
if ( $query->is_tag && (array) $query->get( 'post_type' ) != array( TribeEvents::POSTTYPE ) ) { | |
if ( empty( $query->query_vars['post_type'] ) ) { | |
$query->query_vars['post_type'] = array( 'post' ); | |
} | |
if ( ! ( $query->query_vars['post_type'] == array( 'post' ) || $query->query_vars == 'post' ) ) { | |
remove_action( 'parse_query', array( 'TribeEventsQuery', 'parse_query' ), 50 ); | |
remove_action( 'pre_get_posts', array( 'TribeEventsQuery', 'pre_get_posts' ), 50 ); | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment