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 trialS Ananda
9,474 PointsNot most recent...
I just noticed something in this course. I just put in my own username and it brought up my badges just fine. However, they are NOT the 20 most recent, but starting from when I started at treehouse. They are in fact, the 20 oldest courses I've completed.
I think there must be a line of code that should be added in order to get the date sequence correct. If anyone has figured out, please share and illuminate us other plugin developer students.
Once I finish the course I may come back and see if I can figure out how to fix this date problem.
2 Answers
S Ananda
9,474 PointsNow that I'm in the section on widgets he is showing the correct code for getting the most recent badges.
Dan Weru
47,649 PointsI haven’t tackled the exercise for this particular course. That said, treehouse stores the badges and other user’s data in an object. Last time I checked, this object had the badges with their respective dates (when they were gained). The line you’re looking for could be solved using this info. You could query based on the dates.
Hopefully that’s a good start.