Help Desk

How to get the current event category ID and Event date in functions.php

  • Posts: 18 Topics: 9
    | Permalink

    I need to be able to pull the current event category ID of the current post and the event date (for a single day – /calendar/today/?action=tribe_event_day&tribe_event_display=day&tribe-bar-date=2017-12-06 ). I also need to know what variable I need to use to change that date when the AJAX call is made to go to the next or previous date. Do I need to use ‘tribe-bar-date’ and then use JavaScript to update the date?

    Thank you in advance.

    Posts: 18 Topics: 9
    | Permalink

    Just to clarify, I need to be able to pull the current event category ID for each event as it is creating the event list: while ( $day[‘events’]->have_posts() ) : $day[‘events’]->the_post(); endwhile;

    Posts: 18 Topics: 9
    | Permalink

    Still trying to find an answer here … I really need to be able to pull the category id and the event date (single day) during while ( $day[‘events’]->have_posts() ) : $day[‘events’]->the_post(); endwhile; I can get away with not being able to have that in functions.php now. Please advise.

    Posts: 18 Topics: 9
    | Permalink

    Never mind. I resolved this myself.

    Posts: 5026
    | Permalink

    Hi Kyle,

    I’m sorry for the delayed response here, but I’m glad to hear that you were able to get this figured out. I’ll go ahead and close out this thread, but if you need help with anything else, please feel free to open up a new thread!

The topic ‘How to get the current event category ID and Event date in functions.php’ is closed to new replies.