Access post id of events from event_list_item_format.php
-
I’m trying to access the post id of events via event_list_item_format.php so that I can use it in native WordPress functions such as get_post_meta(). However, when I try to access the $EM_Event object, it returns NULL.
global $EM_Event; var_dump($EM_Event->post_id);
I thought this work work, based on this thread.
This problem only occurs when I’m trying to access info on multiple events, i.e. in event_list_item_format.php, but it works as expected in single_event_format.php.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Access post id of events from event_list_item_format.php’ is closed to new replies.