Instruct WordPress to search on all post types when doing a category taxonomy query.

<?php
function post_type_category_fix($request) {
if ( isset($request['category_name']) && !isset($request['post_type']) )
$request['post_type'] = 'any';
return $request;
};
add_filter('request', 'post_type_category_fix');
view raw category_tax_fix.php hosted with ❤ by GitHub
Tagged: