Support

Home Forums Event Espresso Premium Get event's category slug

Get event's category slug

Posted: September 6, 2016 at 3:45 pm


yamamDev

September 6, 2016 at 3:45 pm

I saw a few posts about this, but they seem to be using EE3.
https://eventespresso.com/topic/event-category/
https://eventespresso.com/topic/conditional-statements-on-registration_page_display-php/

Is this function still valid/working in EE4? Im getting an error saying im calling an unknown function.

$category_name = espresso_event_category_data($event_id, TRUE);


Josh

  • Support Staff

September 7, 2016 at 6:45 am

Hi there,

Anything from EE3 will generally not work in EE4. Since EE4’s events are custom post types, you can get the event’s category slug with the wp_get_post_terms() function.

https://codex.wordpress.org/Function_Reference/wp_get_post_terms

The support post ‘Get event's category slug’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 3 years, 2 months ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!
[for="input_96_5_3"]
[for="input_96_5_3"]
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[i]
[i]
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.