• Resolved ollyb

    (@ollyb)


    Hi there

    I’m trying to find a function which will simply give me the category or array of categories of a specific post, eg:

    $cats = tribe_get_post_cats($post->ID);

    Which would then produce an array, eg Array([0] => 'Music')

    I can’t seem to find anything like this. I can pull out the metadata, but this is much more complicated as it needs parsing, etc.

    Is there anything available like the above?

    Thanks

    https://www.ads-software.com/extend/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey ollyb. Thanks for the note here, and for your detailed explanation of the end goal. I apologize on our end for not getting you a response until now; we have been on a limited support schedule the past few weeks and are just getting back to the swing of it this week.

    Does the issue here persist, or did you get this sorted? Let me know and I can get you what you need.

    Thread Starter ollyb

    (@ollyb)

    Thanks for the reply!

    I actually worked round it.

    I’ve ended up using SQL to get the info I need, and found the categories using the taxonomy and terms tables.

    Keeping everything in one query makes it a bit easier actually!

    Cheers

    Excellent to hear! That is definitely a solid solution. Thanks for confirming as much.

    Going to mark this one RESOLVED, but if we can do anything else in the future please just let us know and we’ll try our best. Otherwise have a great night and thanks for using The Events Calendar.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘get categories for single event’ is closed to new replies.