Support

Account

Home Forums Front-end Issues list from post_object field isn't displayed correctly Reply To: list from post_object field isn't displayed correctly

  • Sorry, here’s the complete code.:

    
    <?php $post_objects = get_field( 'field1' ); ?>
    	<?php if ( $post_objects ): ?>
    		<ul>
    			<?php foreach ( $post_objects as $post ):  ?>
    			<?php setup_postdata( $post ); ?>
    			<li>
    				<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    			<li>
    		<?php endforeach; ?>
    		</ul>
    		<?php wp_reset_postdata(); ?>
    	<?php endif; ?>