Skip to content

Instantly share code, notes, and snippets.

@ptahdunbar
Created March 20, 2013 08:56
Show Gist options
  • Save ptahdunbar/5203256 to your computer and use it in GitHub Desktop.
Save ptahdunbar/5203256 to your computer and use it in GitHub Desktop.
Widgets and Widget Areas
<?php
// functions.php
register_sidebar(array(
'id' => 'custom',
'name' => 'Custom Widget Area',
));
<div class="widget-area widget-area-custom">
if (!dynamic_sidebar('custom')) {
echo 'Nothing to show.';
}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment