Wordpress: get current taxonomy


/ Published in: PHP
Save to your folder(s)

In Wordpress if you are using a custom taxonomy you can get its details (id, slug, etc) using this snippet.


Copy this code and paste it in your HTML
  1. $terms = get_the_terms($post->id, 'TAXONOMY_NAME');
  2. print_r($terms);

URL: http://wordpress.org/support/topic/get-the-current-category-taxonomy-term-name

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.