Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress How to Make a Website with WordPress WordPress Widgets and Custom Menus How to Create Widgetized Areas in WordPress

If no dynamic sidebar?

if( !dynamic_sidebar( 'uptop' ) );

What is this line of code saying exactly?

If there is no dynamic sidebar 'uptop' then do what? I've never ever seen a conditional end with a semicolon. I know the brackets are there so PHP will know where the code block begins / ends.

http://codex.wordpress.org/Function_Reference/dynamic_sidebar It says in the documentation that dynamic_sidebar function returns a boolean true / false.

Thank you,

Ryan

1 Answer

I think I might've figured out some of it. This basically goes to say don't output any widget area if dynamic_sidebar returns false. The semicolor caught me off guard because I've never seen that before but it just terminates the statement.

Am I correct?