Title: Tags snippet
Last modified: September 10, 2026

---

# Tags snippet

 *  Resolved [laurab33](https://wordpress.org/support/users/laurab33/)
 * (@laurab33)
 * [3 weeks, 5 days ago](https://wordpress.org/support/topic/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/](https://docs.codeat.co/glossary/faq/)),
   the following snippet is provided to add tags to glossary terms:
 *     ```wp-block-code
       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/](https://wordpress.org/support/topic/tag-in-terms/))
   recommends this snippet in the functions.php file to support tags:
 *     ```wp-block-code
       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)

 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [3 weeks, 5 days ago](https://wordpress.org/support/topic/tags-snippet/#post-19017399)
 * We did some changes and I forgot to update our doc, the new code is:
 *     ```
       add_action( 'plugins_loaded', function () {
       	add_filter( 'glossary_cpt_tags', '__return_true' );
       } );
       ```
   
 *  Thread Starter [laurab33](https://wordpress.org/support/users/laurab33/)
 * (@laurab33)
 * [3 weeks, 5 days ago](https://wordpress.org/support/topic/tags-snippet/#post-19018002)
 * Hi Daniele! Thank you so much for the quick response. Unfortunately, I’m still
   not seeing glossary term tag options in my admin area. Maybe I’m implementing
   the snippet wrong. I’m pasting it into: My site > public_html > wp-content > 
   plugins > glossary-by-codeat > functions > functions.php, line 22.
 * Does it belong in the main functions.php file? My site > public_html > wp-includes
   > functions.php?
 * Many thanks for your help.
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [3 weeks, 2 days ago](https://wordpress.org/support/topic/tags-snippet/#post-19019267)
 * No this isn’t the right path, you have to put that code in the functions.php 
   of your theme.
 *  Thread Starter [laurab33](https://wordpress.org/support/users/laurab33/)
 * (@laurab33)
 * [6 days, 22 hours ago](https://wordpress.org/support/topic/tags-snippet/#post-19033506)
 * Hi Daniele! Thanks again for the timely and helpful support. However, this still
   didn’t work for me. I look forward to a future update that includes this feature;
   I’d happily pay for it.
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [6 days, 8 hours ago](https://wordpress.org/support/topic/tags-snippet/#post-19033945)
 * Hi, this is very strange I will investigate as it is something that should works
   already.
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [6 days, 7 hours ago](https://wordpress.org/support/topic/tags-snippet/#post-19034001)
 * I am doing a new release that should include the bugfix.
 * EDIT: didn’t worked, I am investigating
    -  This reply was modified 6 days, 7 hours ago by [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/).
 *  Plugin Author [Daniele Scasciafratte](https://wordpress.org/support/users/mte90/)
 * (@mte90)
 * [6 days, 4 hours ago](https://wordpress.org/support/topic/tags-snippet/#post-19034220)
 * The right snippet is:
 *     ```
       add_action( 'init', function () {
       	add_filter( 'glossary_cpt_tags', '__return_true' );
       }, 5 );
       ```
   
 * I will update the official documentation right now.
 * Sorry for the various issues.
 *  Thread Starter [laurab33](https://wordpress.org/support/users/laurab33/)
 * (@laurab33)
 * [4 days, 23 hours ago](https://wordpress.org/support/topic/tags-snippet/#post-19035294)
 * Amazing! That’s working perfectly now. No worries at all about how we got here,
   I’m just excited we did. Once I launch my site, this is the glossary plugin I’ll
   pay for. 12/10 support.
   For folks who might find this in the future, I pasted
   the provided snippet to: MyExampleSite.com > public.html > wp-content > themes
   > MyExampleTheme > functions.php

Viewing 8 replies - 1 through 8 (of 8 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftags-snippet%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/glossary-by-codeat/assets/icon-256x256.png?rev=1889092)
 * [Glossary](https://wordpress.org/plugins/glossary-by-codeat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/glossary-by-codeat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/glossary-by-codeat/)
 * [Active Topics](https://wordpress.org/support/plugin/glossary-by-codeat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/glossary-by-codeat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/glossary-by-codeat/reviews/)

## Tags

 * [tag](https://wordpress.org/support/topic-tag/tag/)
 * [tagging](https://wordpress.org/support/topic-tag/tagging/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * 8 replies
 * 2 participants
 * Last reply from: [laurab33](https://wordpress.org/support/users/laurab33/)
 * Last activity: [4 days, 23 hours ago](https://wordpress.org/support/topic/tags-snippet/#post-19035294)
 * Status: resolved