Home › Forums › Calendar Products › Events Calendar PRO › Adding tags to events (code from FAQs not working)
- This topic has 10 replies, 5 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
April 22, 2012 at 3:22 pm #18115IsaacMember
Hi, I’m trying to add tags to my events (for Admin interface and front-end), but I just can’t see how… I tried using the piece of code provided in the FAQs for my functions.php file: register_taxonomy_for_object_type(‘tribe_events’, ‘tags’);
However, this doesn’t seem to do any change for me… Is there any other code I could use to enable the use of tags for my events?
Any help is greatly appreciated!!
Thanks
April 22, 2012 at 4:33 pm #18117HenryMemberI think it is post_tags or post_tag that you need and not “tags”
Try using:
register_taxonomy_for_object_type(‘tribe_events’, ‘post_tags’);
April 22, 2012 at 7:22 pm #18119IsaacMemberHi Henry… This doesn’t seem to work 🙁 What could be the problem, please?
April 23, 2012 at 3:45 am #18124HenryMemberAh. Maybe try this:
April 23, 2012 at 5:57 am #18125IsaacMemberThis isn’t working either 🙁 I tried the new code with post_tag or post_tags… Is there another way I could try enabling tags for events please?
April 23, 2012 at 7:11 am #18127HenryMemberIt is actually post_tag that you need to use. I did some digging.
I don’t know how else you could do this without hacking the core. Maybe one of the developers (Rob or Jonah) may know a way?
April 23, 2012 at 8:17 am #18157RobMemberThanks for the heads up, guys. Let me see what Jonah has to say when he hits the forums this morning. Stay tuned.
April 23, 2012 at 10:18 am #18179JonahParticipantHey Isaac, try throwing it into a function and hooking into the init action like so:
function run_init() {
register_taxonomy_for_object_type('post_tag', 'tribe_events');
}
add_action('init','run_init');
April 23, 2012 at 12:14 pm #18195IsaacMemberThanks Jonah! This worked great!! 🙂
April 23, 2012 at 5:34 pm #18210RobMemberExcellent to hear it, Isaac. Let us know if we can do anything else down the road and thanks again for your support.
July 7, 2015 at 6:19 am #976647Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Adding tags to events (code from FAQs not working)’ is closed to new replies.