Created
January 8, 2016 06:29
-
-
Save sumanahmed/4c78d195fdf6924af1ca to your computer and use it in GitHub Desktop.
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
/*This code for sidebar widget register*/ | |
function widget_areas() { | |
register_sidebar( array( | |
'name' => 'Left Menu', | |
'id' => 'left_sidebar', | |
'before_widget' => '<div class="single_sidebar">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2>', | |
'after_title' => '</h2>', | |
) ); | |
} | |
add_action('widgets_init', 'widget_areas'); | |
/*codndition code for widget */ | |
<?php if ( ! dynamic_sidebar( 'sidebar_left' ) ) : ?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment