Support

Account

Home Forums Backend Issues (wp-admin) Getting Custom Fields to display Reply To: Getting Custom Fields to display

  • Sometimes I run into issues with the detection of the post ID in the default loops. Might try manually passing in the ID and seeing if you get the expected values. Edited code:

    
    <?php while ( have_posts() ) : the_post(); ?>
    
      <h1><?php the_field('event_name', get_the_ID()); ?></h1>
    
      <a href="<?php the_field('event_url', get_the_ID()); ?>">Test URL</a>
    
      <p><?php the_content(); ?></p>
    
    <?php endwhile; // end of the loop. ?>