• I’ve created a custom post type called ‘Event’ and I’m trying to make it appear all the content from each post appear on an ‘Events’ page. I’ve been able to show the unstyled content by placing this the code below into loop-page.

    <?php if(is_page('Events')){ ?>
    			<?php			
    
    	$args = array( 'post_type' => 'event', 'posts_per_page' => 10 );
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
    	the_title();
    	echo '<div class="entry-content">';
    	the_content();
    	echo '</div>';
    endwhile;
    ?>
    						<?php } ?>

    However the custom image field I added doesn’t show up and neither does all the styling I added. How would I be able to pull all the post content including custom fields all styled onto my Events page?

  • The topic ‘Display entire post contents on a page’ is closed to new replies.