• Resolved Samuel RM

    (@samuel-rm)


    Hi, at first big up for the plugin, seems to work like a charm.

    I’m actually working on a custom theme and I’d like to include event datas such as “begin” and “end” dates in my index.php loop – like after each post title – to display them on my homepage.

    Is it possible to call these datas using simple php calls like <?php the_date(); ?> or is there any other simple solutions?

    I have tried for hours, I must admit I dont speak wordpress very fluently yet.

    Thanks a lot!

    https://www.ads-software.com/plugins/event-post/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bastien Ho

    (@bastho)

    Hi

    Thank you so much.
    If you talk a little bit PHP, more than WP, you can add these lines to get the content you want :

    Assumed, you’re in the loop :

    $event=$EventPost->retreive();
    echo $event->start.' '.$event->end;

    If you prefere timestamp values to do what you want :

    $event=$EventPost->retreive();
    echo $event->time_start.' '.$event->time_end;

    For a specific event, the function can be called with a parameter :
    $event=$EventPost->retreive($post);
    where $post can be an integer or an object.

    Hope it helps !

    Thread Starter Samuel RM

    (@samuel-rm)

    Great, it works fine!
    Many thanks!

    Plugin Author Bastien Ho

    (@bastho)

    You’re welcome

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Include event datas in a specific place of the loop’ is closed to new replies.