• JanPavelka

    (@janpavelka)


    Hello guys,

    thank you for your great service.

    I have a question.

    I need to work with the default WordPress archive.php and have the filter results in a custom layout.

    I can display e.g. the name of the event, content or thumbnail well. How can I display, for example, the date of the event (in the middle of the loop) on the archive.php page please?

    <?php echo $EM_Event->output("#_EVENTDATES"); ?>

    Thanks a lot.

    Kind regards,

    Jan

Viewing 1 replies (of 1 total)
  • joneiseman

    (@joneiseman)

    Try this:

    <?php
    if ( isset( $post ) && is_object( $post ) && function_exists( "em_get_event" ) ) {
    $EM_Event = em_get_event( $post->ID, 'post_id' );
    if ( is_object( $EM_Event ) ) {
    echo $EM_Event->output( "#_EVENTDATES" );
    }
    }
    ?>
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.