Joshua

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Event custom meta fields for WP_Query #1232610
    Joshua
    Participant

    Thanks for this. What was tripping me up was that _EventStartDate is just a string so I had to convert it into a datetime object to work with it like so:

    <?php
    $start = get_post_meta( get_the_ID(), '_EventStartDate', true );

    date_default_timezone_set('America/Chicago');

    $date = date("M n", strtotime($start));

    echo '‘ . $date . ‘‘;
    ?>

    Joshua Michaels
    studio.bio
    web development | UI/UX design | wordpress | design | branding | e-commerce | interactive

Viewing 1 post (of 1 total)