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 How to Build a WordPress Theme Converting Static HTML into WordPress Templates Convert Custom Post Type Listing Template

work.php not displaying projects

The work.php file will not display the flexslider images locally. Not sure why, tried viewing source and couldn't see any of the markup but if I put in a random <p>Test</p> it shows. Replaced my code with the provided project code and still won't render (should I be saying 'parse'?)

1 Answer

Jon W
Jon W
6,185 Points

When you say flexslider images, do you actually have a JS flexslider on your work.php page (not the case in the project files) or just trying to display the slider image (custom field).

If you just paste <?php the_field ('homepage_slider_image'); ?> within the loop in work.php, do you get anything?

Also the custom field will only work if the loop argument has been set to use 'post_type' => 'work' (or whatever you named your CPT).