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

WordPress PHP for WordPress PHP Basics for WordPress PHP Basics for WordPress Quiz

Hot Bricks Employee
Hot Bricks Employee
10,991 Points

Hello Team, I am having trouble with the template tag question that enables you to echo the title of a post or page.

Love to know the answer to this question. I have tried almost everything. Cheers

2 Answers

Erik McClintock
Erik McClintock
45,783 Points

Austin,

There are a few ways to go about this, one of which is to visit the WordPress Codex and search for "title", and then read through your results until you find the one you're looking for. If you did that, you would come across the page for the_title(), which is what you're looking for here :)

Erik

Hot Bricks Employee
Hot Bricks Employee
10,991 Points

Thanks Erik. After I posted I kept researching and finally came to the answer immediately afterward, the_title().

Cheers!

Erik McClintock
Erik McClintock
45,783 Points

Perfect! Google is an awesome resource, and it's best to get familiar with the WordPress Codex sooner than later, as it is one of the best resources out there for WordPress developers!

Happy coding!