File size: 1.92Kb
<?php
// sidebars
add_action( 'widgets_init', 'weart_widgets_init' );
function weart_widgets_init() {
if ( function_exists('register_sidebar') ) {
register_sidebar( array(
'name' => esc_html__( 'Article Sidebar', 'stuffpost' ),
'id' => 'sidebar-article',
'description' => esc_html__( 'Displays only in articles/pages.', 'stuffpost' ),
'before_widget' => '<div id="%1$s" class="%2$s box mb-4 f-text l-black lh-1 c-black">',
'after_widget' => '</div>',
'before_title' => '<h4 class="text-uppercase mb-3 h5 pb-1 border-bottom brd-1 brd-width-bold">',
'after_title' => '</h4>',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Sidebar', 'stuffpost' ),
'id' => 'sidebar-footer',
'description' => esc_html__( 'Displays only in the footer on all page.', 'stuffpost' ),
'before_widget' => '<div id="%1$s" class="%2$s box col-lg-4 col-md-6 f-text l-meta lh-white c-meta border-right mb-4 mb-lg-0">',
'after_widget' => '</div>',
'before_title' => '<h4 class="text-uppercase mb-3 h5 pb-1 border-bottom c-white">',
'after_title' => '</h4>',
) );
register_sidebar( array(
'name' => esc_html__( 'WooCommerce Sidebar', 'stuffpost' ),
'id' => 'sidebar-woocommerce',
'description' => esc_html__( 'Displays only in Shop pages.', 'stuffpost' ),
'before_widget' => '<div id="%1$s" class="%2$s box mb-4 mt-2 f-text l-black lh-1 c-black">',
'after_widget' => '</div>',
'before_title' => '<h4 class="text-uppercase mb-3 h5 pb-1 border-bottom">',
'after_title' => '</h4>',
) );
}
}
// Widgets
// latest posts
require get_template_directory().'/functions/widget/widget-latest.php';
// Category posts
require get_template_directory().'/functions/widget/widget-category-posts.php';