Support » Plugin: Event post » Start-date in the post title?

  • Resolved ixinho


    Hello is it possible to have start date somehow in the post title ?
    I have a category posts widget on my homepage which displays these posts, and i would like to have an option of letting people know when will the event happen without clicking on the post. . .

Viewing 12 replies - 1 through 12 (of 12 total)
  • With this code you get the Event-Date instead of the publication date.

    <?php  $display_date = date('d.m.Y', strtotime(get_post_meta($post->ID, 'event_begin', true)));
                             if ( $display_date == '01.01.1970'): { the_time('d.m.Y'); } else: { echo $display_date;  } endif; ?>

    Thank you for the reply. Where should i place the code?

    Depends on your theme. In my case in archive.php

    Hm, but will it replace the date for all post types or only for event posts made with this plugin?

    And shall i use it without php tag if i put it in some php page that already has tags?

    Plugin Author Bastien Ho



    you can also use in your theme the wrapper functions (listed here:



    Thank you. Could you please assist me with that, since i don’t know where and how should i put it ?

    Could i please have some help on having the event date instead of published date for the event-posts ? It’s kinda really urgent to me : /

    Plugin Author Bastien Ho


    Has @dombucheli said, you have to manage it in your theme. actually, if you do not touch php, you can’t.

    This post has been extremely helpful and the plugin is awesome!

    I need a little more help though. In addition to the event date instead of published date, I’d like to have the start and end times of the event as well.

    Could you extremely clever guys help me out with a line or two of code I can use to add to the date and achieve this?

    I’m very new to php and unable to write the code myself but can find my way around and put it in the right place.

    Many thanks

    Just to make things clearer, here’s the code listed above:

    ` <h3><?php $display_date = date(‘F j, Y’, strtotime(get_post_meta($post->ID,
    ‘event_begin’, true)));
    if ( $display_date == ‘01.01.1970’): { the_time(‘F j, Y’); } else: { echo
    $display_date; } endif; ?></h3>`

    I just need to add start time and end time e.g. June 29, 2017 from 10:00 am to 3:00 pm

    Many thanks again

    • This reply was modified 1 year, 3 months ago by  adrianwest.
    Plugin Author Bastien Ho


    Hi @adrianwest,

    In order to simply display the current post’s dates, you can use the wrapper function <?php the_dates(); ?>.

    It uses the $EventPost->delta_date() method.

    PS: Thank you 😉

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Start-date in the post title?’ is closed to new replies.