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 trialOlga Dorovskykh
1,545 PointsProblems with get_the_author_meta()
Hello! I get an "unexpected function" for get_the_author_meta().
The line of code is exactly like this:
<?php get_avatar( get_the_autor_meta( 'ID' ), 24 ); ?>
What's wrong?
Thanks in advance!
2 Answers
Gleb Vorobjev
13,704 PointsIn your original post, get_the_autor_meta( 'ID' ) has a typo. It should be get_the_author_meta( 'ID' )
Olga Dorovskykh
1,545 PointsI used example from the Function Reference and it worked:
<?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?>