Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress How to Build a WordPress Theme Converting Static HTML into WordPress Templates Convert Custom Post Type Details Template

Parameter 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

Figured 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.