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 trialAshish Mehra
473 Pointsnot operator in front of dynamic_sidebar() ?
Hey I didn't understand why not operator is used here in front of function dynamic_sidebar()
2 Answers
Christie Parkhurst
6,059 PointsThe "not" operator is basically saying, if there is no side bar widget set up in admin, show whatever code you have typed directly into the template instead.
kelley riley
3,159 PointsYeah I think I understand what you were getting at here Ashish. If "Contact" is a page sidebar then using the "!" operator would prevent that html from showing up. You'd want it to say: "IF this is a page sidebar then do this". I had to remove the operator to get this to work..