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 WordPress Header and Footer Templates WordPress Header and Footer Quiz

Michael McCracken
Michael McCracken
1,884 Points

Is the quiz looking for PHP functions?

I am having trouble with this quiz. Despite knowing the answers to all of the questions, I keep failing two of the questions because I don't understand what format the answer should be in. Specifically, these are the two questions:

What function and parameter would you use to dynamically echo out the URL for a WordPress site?

How would you echo out the current year in 4 digits using the PHP date function?

I know the exact functions these questions refer to and have tried typing all and various parts of them, but the quiz does not accept any of my answers. I am not sure how else I can answer the questions. Can you give me at least a hint of what format the answers need to be in? Thanks!

4 Answers

Emma Willmann
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Emma Willmann
Treehouse Project Reviewer

I know I sometimes struggled with these questions, wondering what they wanted on the blank. First, realize they are already providing the semi-colon, so you do not have to type that.

So, as an example, the question about the year all you would answer is

date('Y')

I just did that and it worked fine. (also, make sure the 'Y' is capitalized because 'y' only returns the last 2 numbers of the year).

Hi Michael,

What function and parameter would you use to dynamically echo out the URL for a WordPress site? would need the answer bloginfo('url').

How would you echo out the current year in 4 digits using the PHP date function? would need the answer date('Y').

Hope that helps

-Rich

Michael McCracken
Michael McCracken
1,884 Points

Thanks so much, both of you! I did not realize the semi-colon was provided, so I think that's where I ran into trouble. I was able to pass the quiz now.

Glad you got it sorted.

-Rich

Mohammed Asif Anwar
Mohammed Asif Anwar
5,380 Points

The __________() function calls the footer file in a WordPress theme. cant get this, need help please