Created
April 10, 2015 13:17
-
-
Save mrHiker/bd865642e311c2cdb88c to your computer and use it in GitHub Desktop.
WordPress new sidebar (widget area)
This file contains hidden or 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
| function spotechnology_widgets_init() { | |
| register_sidebar( array( | |
| 'name' => __( 'Основная колонка', 'spotechnology' ), | |
| 'id' => 'main-col-widget', | |
| 'description' => '', | |
| 'before_widget' => '<aside id="%1$s" class="widget %2$s">', | |
| 'after_widget' => '</aside>', | |
| 'before_title' => '<h1 class="hidden">', | |
| 'after_title' => '</h1>', | |
| ) ); | |
| register_sidebar( array( | |
| 'name' => __( 'Номер в футере', 'spotechnology' ), | |
| 'id' => 'spotechnology_f_tel', | |
| 'description' => '', | |
| 'before_widget' => '', | |
| 'after_widget' => '', | |
| 'before_title' => '<h1 class="hidden">', | |
| 'after_title' => '</h1>', | |
| ) ); | |
| } | |
| add_action( 'widgets_init', 'spotechnology_widgets_init' ); |
This file contains hidden or 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
| <div> | |
| <?php dynamic_sidebar('main-col-widget'); ?> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment