How to get the event title outside of the loop?

WordPress Event Management, Calendars & Registration Forums General Question How to get the event title outside of the loop?

This topic contains 2 replies, has 2 voices, and was last updated by  Adrian Maleska 10 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #14527

    When being inside of the loop or in the form it’s simple to get the event title. But how to get it outside the loop?

    Is there a function like eo_get_the_event_title($event_id) or get_eo_event($post_id) ?

    Adrian Maleska
    #14537

    Nope, but there is get_the_title(). Events are just posts (of ‘event’ post type), so any of the usual WordPress functions for posts will work with events also.

    Stephen Harris
    #14538

    Oh this one was so obvious! Seems that I shouldn’t do programming in the evenings sigh
    Thanks a lot for opening my eyes Stephen.

    Adrian Maleska
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.