Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Theme Development Custom Post Type Templates in WordPress Coding Your Own Custom Post Type Templates

Luke Hartman
Luke Hartman
9,591 Points

Portfolio pages not showing at all. White screen only.

I have gone over all steps in the video and matched my code to his, but the portfolio page/single-portfolio.php page is not showing??

<?php get_header( ); ?>

<section class="two-column row no-max pad">
    <div class="small-12 columns">
        <div class="row">
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
            <!-- Primary Column -->
            <div class="small-12 medium-7 medium-offset-1 medium-push-4 columns">
                <div class="primary">

                    <?php the_field('images'); ?>

                </div>
            </div>

            <!-- Secondary Column -->
            <div class="small-12 medium-4 medium-pull-8 columns">
                <div class="secondary">

                    <h1><?php the_title(); ?></h1>
                    <p><?php the_field('description'); ?></p>

                </div>
            </div>
        <?php endwhile(); endif;  ?>
    </div>
</section>

<?php get_footer( ); ?>

Thanks for your support! -Luke

2 Answers

Luke Hartman
Luke Hartman
9,591 Points

Hi Jacob, I figured it out by turning on debug :)

Thanks for checking in on me! Take care, Luke

Not a problem.

this code looks fine to me, at first glance. I take it you created a custom field from the images, and description? Where you working on another file as well?