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.


Connecting WordPress Plugins with 3rd Party APIs

Code challenge question: Now you have the profile data from your JSON feed in the $my_plugin_profile variable (see example in the comment). Echo out the name of the user from the profile.

I used <?php echo $my_plugin_profile->{ 'name' }; ?> but I got a "Bummer, Try Again" message. I tried this inside a paragraph, inside a postbox, etc. Not sure what I'm missing.

1 Answer

Andrew Showalter
Andrew Showalter
14,028 Points

I am not sure if this could be your issue, but, in the code challenge you don't need to wrap the echo statement in php tags.

echo $my_plugin_profile->{"name"};

I just ran that in the code challenge and it worked for me.