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!
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

Greg Leibowitz
28,536 PointsExtending WordPress Template Functionality > Adding Content in Custom Places - Part 2
In the $args = array why is the 'cat' => -1 when the tag ID=4?
2 Answers

Matt Campbell
9,767 PointsYou're excluding category with the category ID of 1. The tag ID is the tag of the tag, not the category.

Isaac Russell
12,091 PointsI think Pedro might be onto something. For whatever reason my ID tag was 5 and when I used -5 in my code the recent post showed up on the homepage. I think Zac should clear this up for us.
Pedro Baumann
12,815 PointsPedro Baumann
12,815 PointsI'm not totally sure about this, are you sure? I spotted that same problem while doing that exercise. The whole point of him teaching where to find the tag ID was so we knew which category to exclude.
I did some tests and with -1 instead of -4 it did not exclude the featured articles from the recent posts highlight. It did however when I used -4.
I think there are two error in that video that have been giving all trouble (the other one being https://teamtreehouse.com/forum/adding-content-custom-places-part-2)
Maybe adding a quick note at the end of the video might help?
Greg Leibowitz
28,536 PointsGreg Leibowitz
28,536 PointsMaybe Zac Gordon knows?