How to get vocabulary id by name in Drupal?

Posted by Pinki | Updated on

If you want to get vocabulary id by name in Drupal? Use below function to get vocabulary id by name.

If you want the vid just get the vid property of the returned object and.

Henriks point about storing it in a variable is very valid as the above code you won’t want to be running on every request.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers