WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] $EM_Event Object does not contain Image URL (3 posts)

  1. Blowsie
    Member
    Posted 1 year ago #

    Im templating my events using php objects rather than placeholders.

    However I have ran into one issue. I cannot get the image url or the attachment id from the $EM_Event object (see the returned object here).

    How do I get the image information?

    http://wordpress.org/extend/plugins/events-manager/

  2. Blowsie
    Member
    Posted 1 year ago #

    I realised I can use the same approach that is used to get a normal post / page attachment.

    wp_get_attachment_image_src( get_post_thumbnail_id( $EM_Event->ID ))

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    alternatively:

    $EM_Event->get_image_url();

    that function is inherited from EM_Object

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags