-
-
Save sunshineg/ace84eafed9a2433a0fa 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
/*theme widget function.php*/ | |
function jobair_widgets(){ | |
register_sidebar(array( | |
'name' => __( 'Right Sidebar', 'theme-slug' ), | |
'id' => 'right_sidebar', | |
'description' => __( 'Right Sidebar.', 'theme-slug' ), | |
'before_widget' => '<div class="right_sidebar border">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2>', | |
'after_title' => '</h2>', | |
) ); | |
} | |
add_action('widgets_init','jobair_widgets'); | |
/*sidebar.php or other file add this code*/ | |
<?php if (! dynamic_sidebar('right_sidebar') ):?> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment