get_the_ID() is working on my local development but not on staging server
Great to see a StackExchange for WP! Ok so I'm working on pulling images and dates from piklist custom post types and I got this working on my local, BUT when I move it to WPEngine I get a white page until I take the code out. The date code doesn't throw a blank page but won't pull the dates entered. Can anyone tell me what about this code may be causing this? Thanks in advance!
CODE
single.php
?php while ( have_posts() ) : the_post(); ?
?php
$image_ids = get_post_meta(get_the_ID(), 'my_media', false);
foreach ($image_ids as $image)
{
echo 'img src=" ' . wp_get_attachment_image_src($image, 'large')[0] . ' "/';
}
?
?php echo get_post_meta(get_the_ID(), 'my_date', true); ?
?php get_template_part( 'content', themeblvd_get_part( 'single' ) ); ?
?php themeblvd_single_footer(); ?
?php if ( themeblvd_supports( 'comments', 'posts' ) ) : ?
?php comments_template( '', true ); ?
?php endif; ?
?php endwhile; ?
Topic get-the-id custom-post-types Wordpress
Category Web