Why use dynamic_sidebar() conditionally?

In the codex example of displaying sidebars, what is the significance of the conditional wrapping around the call to dynamic_sidebar? Why do this:

<?php if ( dynamic_sidebar('example_widget_area_name') ) : else : endif; ?>

this seems to work ok:

Read More
<?php dynamic_sidebar('example_widget_area_name'); ?>

Thanks,

Toby

Related posts

Leave a Reply

1 comment

  1. To quote the Codex

    The return value should be used to determine whether to display a static sidebar. This ensures that your theme will look good even when the Widgets plug-in is not active.

    So essentially you can use is to display other content if the user has not activated any widgets in the sidebar.