Created
May 23, 2013 04:58
-
-
Save jayseventwo/5632842 to your computer and use it in GitHub Desktop.
Create a custom widget area.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add to functions.php | |
if (function_exists('register_sidebar')) { | |
register_sidebar(array( | |
'name' => 'Right header', | |
'id' => 'custom-widget-01', | |
'description' => 'Widget Area', | |
'before_widget' => '<div id="one" class="two">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2>', | |
'after_title' => '</h2>' | |
)); | |
} | |
// add to theme | |
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Right header') ) : ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment