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

Mark McGuinness
PLUS
Mark McGuinness
Courses Plus Student 26,312 Points

WordPress Header and Footer Templates, Quiz says 2 of my answers are wrong. Why is this ?

I have answered all of the quiz questions correctly apart from the following 2 questions which just give me a wrong answer no matter what I put in. Is there a specific exact answer required as everything I've tried just wont pass as correct.

The questions are:

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

I have tried various versions of echo date('Y') such as just echo date or ('Y') and even enclosed in php code block but nothing passes.

I get the same with this question as well using variations of bloginfo('url')

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

I am using a windows PC so wondered if this is a bug with keyboard characters as single quotes render leaning left rather than upright. Have tried using double quotes but no luck either.

This is driving me around the bend so would be grateful for any enlightenment as to what's wrong.

10 Answers

Mark McGuinness
PLUS
Mark McGuinness
Courses Plus Student 26,312 Points

Seems to be working fine now if you put

echo date('Y')

and

bloginfo('url')

Must have been a bug !!

I tried this, but is still not working.

Simply put this in

date('Y')
Jeremy Hayden
Jeremy Hayden
1,740 Points

Have you tried

echo date("Y");

Mark McGuinness
Mark McGuinness
Courses Plus Student 26,312 Points

Hi Jeremy

Thanks but yes tried that one and still no luck :(

Carl Brook
Carl Brook
1,563 Points

I am having the same issue as this ! very annoying :)

James Trendell
James Trendell
9,254 Points

This has been the worst quiz I've done on treehouse! Spent about 30 mins trying to solve this one alone!

George Straehle
George Straehle
755 Points

these quizzes are poorly designed. i really don't like them.

Ok, this quiz is really a bummer.

The answers as suggested above and all of the possible variations are still not working. I tried many and already spend 45 minutes just on this quiz.

Wordpress, can you please recheck your quiz? As you can see many people have problems with this particular one.

Help very much appreciated!

Elijah is right: enter date ('Y') and it should work

Michel Kompanje
Michel Kompanje
1,893 Points

but the answers to the "url" and "name" questions should be right to?

bloginfo('url') bloginfo('name')

If your lucky you'll pass with 1 error...

Do not add the semi-colon at the end. Make sure you are not doing. Check and then check again because that is probably the problem.