Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter funkyaik

    (@funkyaik)

    Hi Angelo

    Thanks for getting back to me. I think I can manage the code part (I hope 😉 But I was wondering where I should add the code into Event Manager. I don’t want to hack the code so it breaks when I update EM. Should I put the code in the template file? I’m guessing I need some kind of a hook or filter so I can either override EM adding the db or to ammend variables passed through the Post request.

    Many thanks

    Thread Starter funkyaik

    (@funkyaik)

    Sorry let me be a little clear I would like to add terms to a taxonomy. For example if I had a taxonomy called “Genres”

    In the database I had the following terms:

    Jazz, Funk and rock Rock

    The user adding an event wanted to associate some genres with their event and typed in

    Jazz and Soul

    Jazz already exists in the db as a term so it would just be linked to the event (custom post type) but Soul doesn’t exist so that would be added as a term under Genre.

    I would like to have multiple input text fields to add Genre/s (taxonomy terms) and each text field to auto-complete with suggestions from the database.

    One other problem I wanted to solve which is related to this is the issue of spelling genres in different ways for example you could have hip hop, hiphop, hip-hop.

    Before Event Manager writes to the database to associate a term with the event I would like it to check something, lets say you have this in the DB table:

    Term ID Term Name AKA ID (aka also known as)
    1………….Hip-hop……
    2………….Hiphop……..1
    3………….hip hop…….1

    What I would like to do is add a custom field to the taxonomy terms so I can check if the text that was typed in wa Hiphop or hip hop. If it is then rather than add Term ID 2 or 3 to the event it would add Term ID 1. I think it would be pretty straightforward to write code for this but I don’t understand at what point I would add my code or what hooks I could use to treat the data before Event Manager writes to the DB

    Does that make sense? Hope that was a little clearer and sorry for the long msg

    Many thanks

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