Created
May 19, 2018 20:09
-
-
Save leepettijohn/b6081ae367a7cc727f720c7b47f664ae to your computer and use it in GitHub Desktop.
Add Widget Area to Non-Genesis Theme
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 widget area *** */ | |
register_sidebar( array( | |
'name' => __( 'New Widget Area'), | |
'id' => 'new-widget-area', | |
'before_widget' => '<div id="%1$s" class="widget %2$s">', | |
'after_widget' => '</div>', | |
'before_title' => '<h3 class="widgettitle">', | |
'after_title' => '</h3>' | |
)); | |
if( is_active_sidebar( 'new-widget-area' ) ) : ?> | |
<aside class="new-widget-area"> | |
<?php dynamic_sidebar( 'new-widget-area' ); ?> | |
</aside> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment