Tags snippet
-
Hi! I’m trying to implement tags but I’m getting conflicting information and none of it works.
At the bottom of the FAQ (https://docs.codeat.co/glossary/faq/), the following snippet is provided to add tags to glossary terms:
add_action( 'plugins_loaded', function() { register_taxonomy_for_object_type( 'post_tag', 'glossary' ); }, 99999);However, a post from 3 years ago (https://wordpress.org/support/topic/tag-in-terms/) recommends this snippet in the functions.php file to support tags:
add_action( 'init', 'glossary_register_taxonomy_for_object_type' ); function glossary_register_taxonomy_for_object_type() { register_taxonomy_for_object_type( 'post_tag', 'glossary' ); }I’ve tried both and neither work. I’ve tried clearing my caches as well. Please advise & many thanks.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.