Skip to content

Instantly share code, notes, and snippets.

@nashvillegeek
Created April 22, 2013 18:29
Show Gist options
  • Save nashvillegeek/5437327 to your computer and use it in GitHub Desktop.
Save nashvillegeek/5437327 to your computer and use it in GitHub Desktop.
Wordpress: Display Sidebar
<snippet>
<content><![CDATA[
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar(' ${1:Sidebar Widgets} ')) : else : ?>
<!-- All this stuff in here only shows up if you DON'T have any widgets active in this zone -->
<p>Please activate some widgets</p>
<?php endif; ?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>wp-show-sidebar-content</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.php</scope> -->
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment