WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] Pulling Venue data for event in the loop (2 posts)

  1. jorge2904
    Member
    Posted 2 years ago #

    Im trying to make a a page where the events are loaded on the page with the excerpt and the venue data on the right...

    I have the template all setup but im not sure how to access the venue data. When I dump the $post object it give there is a $post->venue variable that just has an ID what function do I use to pull the venue data with that ID?

    Thanks

    http://wordpress.org/extend/plugins/event-organiser/

  2. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    Don't use $post->venue (at least for the latest version). It is depreciated - and will be removed in a future update. Instead, to get the current event's Venue ID use: eo_get_venue(). This can be used inside the loop, as is, or outside the loop by passing it the the event's (post) ID as an argument. See the documentation.

    Also see the list of functions, which include those that allow you to retrieve venue related data, given the venue ID.

    If you are using custom fields for the venues you can use the eo_get_venue_meta() function.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic