Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
こんにちは 、「製品」という用語名があり、用語 ID が「123」であるとします。用語名「製品」を使用して用語 ID「123」を取得するにはどうすればよいですか?
ありがとう
$get_term = taxonomy_get_term_by_name('product'); $term_id = $get_term[0]->tid;
これはうまくいくはずです。
この機能を使用する
taxonomy_get_tid_by_name('product')
戻り値は配列です。