I am working on a plugin where I have to create taxonomy.
But due to my requirement with little bit complexity, I have to create taxonomy without register_taxonomy().
Can somebody give me hints regarding this?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI am working on a plugin where I have to create taxonomy.
But due to my requirement with little bit complexity, I have to create taxonomy without register_taxonomy().
Can somebody give me hints regarding this?
Well, I don't know whats your situation, but I would suggest you to use register_taxonomy()
function to create a taxonomy for your posts or other custom post type. But if you don't wanna use this default system then there are some other ways to do that also.
Before going to the procedures we must know what actually taxonomies do. They just group some elements or thing together. So if we can group some element together without using register_taxonomy()
function then it can be used as a taxonomy for this elements. So now the question is how can we group the elements ? Here comes the procedures part. Sure there are plenty of them, but this time I can suggest you the below ways-
register_taxonomy()
.But remember, usually creating taxonomy functionality using
register_taxonomy()
is the best practice and the taxonomies should be created this way.
Hope the above answer help you.