Last active
August 29, 2015 14:16
-
-
Save iiiBird/b2d34867b06036348b0e 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
<?php | |
function true_register_wp_sidebars() { | |
/* В боковой колонке */ | |
register_sidebar( | |
array( | |
'id' => 'true_side', // уникальный id | |
'name' => 'Боковая колонка', // название сайдбара | |
'description' => 'Перетащите сюда виджеты, чтобы добавить их в сайдбар.', // описание | |
'before_widget' => '<div id="%1$s" class="widjet %2$s">', // по умолчанию виджеты выводятся <li>-списком | |
'after_widget' => '</div>', | |
'before_title' => '<h2>', // по умолчанию заголовки виджетов в <h2> | |
'after_title' => '</h2>' | |
) | |
); | |
} | |
add_action( 'widgets_init', 'true_register_wp_sidebars' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment