Custom taxonomy link opens under Posts

I had the same problem even though my taxonomy was registered to Users. Found the answer at Custom user taxonomies in WordPress by Justin Tadlock (see the comments for the post).

Add this to your code (replace YOUR_TAXONOMY with the proper name):

function fix_user_tax_page( $parent_file="" ) {
    global $pagenow;

    if ( ! empty( $_GET[ 'taxonomy' ] ) && $_GET[ 'taxonomy' ] == 'YOUR_TAXONOMY' && $pagenow == 'edit-tags.php' ) {
    $parent_file="users.php";
    }

  return $parent_file;
}

EDIT: OK, it works just fine the first time, but I have two custom taxonomies, and I can’t get it to work for the second one (everything within the same functions.php file in the child theme). I changed the taxonomy name, the function name, and the global variable name.

Anyone have any ideas?

EDIT:

First of all, the above code was missing a line. The whole thing should be:

add_filter( 'parent_file', 'fix_user_tax_page' );

function fix_user_tax_page( $parent_file="" ) {
        global $pagenow;

    if ( ! empty( $_GET[ 'taxonomy' ] ) && $_GET[ 'taxonomy' ] == 'YOUR_TAXONOMY' && $pagenow == 'edit-tags.php' ) {
        $parent_file="users.php";
    }

    return $parent_file;
}

Second thing, I just found the answer about using this for more than one custom taxonomy:
remove the && $_GET[ 'taxonomy' ] == 'YOUR_TAXONOMY'.