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 trialAndrea Sorrell
4,736 PointsParameter names and Custom Field names
As the the tutorial jumps back and forth from the wp-admin site and text editor I noticed that your field names when entered in admin area are entered in with an underscore between words. For Example: project_images, background_color, and button_color
But when you create the parameters or arguments you type in a hypen between words.
<?php the_field ( 'button-color' ); ?>
<?php the_field ( 'background-color' ); ?>
<?php the_field ( 'project-images' ); ?>
Thus far I have not been able to dynamically have content appear without adjusting either the field name or parameter to match exactly. Is the video edited poorly or should I be able to follow video as is without adjusting field names and or parameters?
1 Answer
Andrea Sorrell
4,736 PointsFigured it out it was just the style name I was using with the hyphen instead of the custom field slug with underscore. My eyes are blurring.