Skip to main content
2 of 4
deleted 1 characters in body
chrisguitarguy
  • 21.5k
  • 5
  • 62
  • 99

If you just want to "turn off" the public facing part of a taxonomy (eg. just use it for grouping), you can do that when you register it.

Just set the query_var argument to false and WordPress will not recognize taxonomy page requests and simply 404.

<?php
add_action('init', 'wpse94193_register');
function wpse94193_register()
{
    register_taxonomy('your_taxonomy', 'your_post_type', array(
        // other stuff here...
        'query_var' => false,
    ));
}

If you do need to allow logged in users to view the taxonomy pages (can't tell from the question), that's different story.

chrisguitarguy
  • 21.5k
  • 5
  • 62
  • 99