For a site I need to show related posts for a custom taxonomy. Because another person build this site and also created a custom taxonomy, and this code can't be found in a proper file like functions.php or a plugin, I need to track this name so I can use it for other code solutions.

For clarity; If I create a custom taxonomy, a part of the code is

register_taxonomy('**SUBJECT TO TRACK**',array('customposttype'), array(

I need to track the part of 'SUBJECT TO TRACK'. Is there any function I could use to show this on a page? probably the answer is simple, but i can't find it anywhere...

1 Answer 1


After messing with some code I found a solution: just use this code and a lot if information will be showed. Within all this data you search for the categorie that is inside your taxonomy and you'll see the taxonomy-> name.

// Show all data of all taxonomies
function print_tax_data(){
    $data = get_terms();
add_shortcode('tax_data', 'print_tax_data');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.