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


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.