{"id":19017030,"date":"2026-09-10T21:11:45","date_gmt":"2026-09-10T21:11:45","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/tags-snippet\/"},"modified":"2026-09-10T21:11:45","modified_gmt":"2026-09-10T21:11:45","slug":"tags-snippet","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/tags-snippet\/","title":{"rendered":"Tags snippet"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi! I&#8217;m trying to implement tags but I&#8217;m getting conflicting information and none of it works.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the bottom of the FAQ (<a href=\"https:\/\/docs.codeat.co\/glossary\/faq\/\">https:\/\/docs.codeat.co\/glossary\/faq\/<\/a>), the following snippet is provided to add tags to glossary terms:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'plugins_loaded', function() {\n   register_taxonomy_for_object_type( 'post_tag', 'glossary' );\n}, 99999);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">However, a post from 3 years ago (<a href=\"https:\/\/wordpress.org\/support\/topic\/tag-in-terms\/\">https:\/\/wordpress.org\/support\/topic\/tag-in-terms\/<\/a>) recommends this snippet in the functions.php file to support tags:<br \/><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'init', 'glossary_register_taxonomy_for_object_type' );\nfunction glossary_register_taxonomy_for_object_type() {\nregister_taxonomy_for_object_type( 'post_tag', 'glossary' );\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve tried both and neither work. I&#8217;ve tried clearing my caches as well. Please advise &amp; many thanks.<\/p>\n","protected":false},"template":"","class_list":["post-19017030","topic","type-topic","status-publish","hentry","topic-tag-tag","topic-tag-tagging","topic-tag-tags"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19017030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19017030\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19017030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}