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!
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

Donal Byrne
3,156 Pointsconvert custom post type listing template stage: projects background color problem
Ok so im the middle of the "how to build a wordpress theme" course at the "convert custom post type listing template" stage. when i do all the code for the projects to show up on the work page, they show up but i cant change their background or button colour.
Does anyone know why this might be?
I don't think the code is the problem. Maybe i did something wrong with the custom fields?
I've been trying to fix it for a while but nothing is working!
any help would be great :)
3 Answers

Chad Pjontek
13,700 PointsI had this issue as well but I found that I did not input all the fields in the admin area under "custom fields/work". Also make sure you use the data to input from the "work-projects.txt" file. That file can be found in the project files zip file from http://teamtreehouse.com/library/how-to-build-a-wordpress-theme/content-strategy-with-wordpress/project-overview

Zac Gordon
Treehouse Guest TeacherCouple things to try:
- Do you see you see the color picker field when you edit a project in the admin area?
- If you try to call the_field('background_color') in your template somewhere you can see it (like under the title) does the correct color display?
- If you try to hard code a color into the inline styles for the project, does that work?

Wayne Fonseca
7,796 PointsHi Donal,
Ensure the following is properly keyed in:
<?php
$args = array(
'post_type' => 'work'
);
$the_query = new WP_Query ( $args );
?>
Wayne Fonseca
7,796 PointsWayne Fonseca
7,796 PointsAny luck solving this issue?