Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Instruct WordPress to search on all post types when doing a post_tag taxonomy query.
function post_type_tags_fix($request) {
if ( isset($request['tag']) && !isset($request['post_type']) )
$request['post_type'] = 'any';
return $request;
add_filter('request', 'post_type_tags_fix');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment