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 WordPress Theme Development Building Page Templates in WordPress The page.php File

Susan Westerman
Susan Westerman
68 Points

Where is title and content actually being stored? i.e where is the function pulling them from?

.

4 Answers

Jeremy Castanza
Jeremy Castanza
12,081 Points

From a technical standpoint, it's pulling the values from the mySQL database that stores all of your WordPress content. The user adds the values to the database through the WP admin, when they create a page or post.

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

When you use <?php the_title(); ?> and <?php the_content(); ?>, it pulls it from whatever the user has set as the title and body of the post of that particular page. If it's inside the loop, then it'll pull the title and content from any posts matching whatever parameters are being used to display the posts.

Zander Curtis
Zander Curtis
10,634 Points

Excellent answer Ryan. Thanks for answering all our questions with such clarity and compassion.