For some odd reason custom fields keep randomly stop working - they're working one minute, then not the next and i do not understand why. The post, meta names and values are all still active - nothing has changed at all.
Any idea what the issue may be? The code i'm using is below and is contained within the header.php file - to re-iterate, it was working fine, then randomly stopped working - this happens pretty much every time i use custom fields.
<div class="slide-title">
<?php echo get_post_meta( get_the_ID(), 'slide_1_title', true ); ?>
</div>
<div class="slide-content">
<?php echo get_post_meta( get_the_ID(), 'slide_1_content', true ); ?>
</div>
<div class="slide-headline">
<?php echo get_post_meta( get_the_ID(), 'slide_1_headline', true ); ?>
</div>
<a href="#"><img src="/images/slides/slide1.jpg"></a>
WP_DEBUG
to use a log file. As soon as you notice a problem look at the file.have_posts()
? Post the code in more context please.