This commit is contained in:
2021-02-28 23:44:31 +08:00
parent a719feebba
commit 2515039d73
16 changed files with 577 additions and 1076 deletions
+25 -11
View File
@@ -122,17 +122,30 @@ add_action( 'after_setup_theme', 'cyywordpress_content_width', 0 );
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function cyywordpress_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Sidebar', 'cyywordpress' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'cyywordpress' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
// register_sidebar(
// array(
// 'name' => esc_html__( 'Sidebar', 'cyywordpress' ),
// 'id' => 'sidebar-1',
// 'description' => esc_html__( 'Add widgets here.', 'cyywordpress' ),
// 'before_widget' => '<section id="%1$s" class="widget %2$s">',
// 'after_widget' => '</section>',
// 'before_title' => '<h2 class="widget-title">',
// 'after_title' => '</h2>',
// )
// );
register_sidebar(
array(
'name' => esc_html__( 'Sidebar', 'cyywordpress' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'cyywordpress' ),
'before_widget' => '<div class="column is-3 %2$s" id="%1$s" >',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
}
add_action( 'widgets_init', 'cyywordpress_widgets_init' );
@@ -178,3 +191,4 @@ if ( defined( 'JETPACK__VERSION' ) ) {
require get_template_directory() . '/inc/jetpack.php';
}
require get_template_directory() . '/inc/bulmapress_navwalker.php';