Thread Starter
Aburub
(@aburub)
I forgot to add the link to the previous post explaining the header widget.
add this to functions.php or create a new file in wp-content/ and name it meso-custom-functions.php and add this code
function dez_add_mainpost_widgets_init() {
register_sidebar(array(
'name'=>__('Main Post', TEMPLATE_DOMAIN),
'id' => 'main-post',
'description' => __( 'Main post widget area', TEMPLATE_DOMAIN ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
));
}
add_action( 'widgets_init', 'dez_add_mainpost_widgets_init' );
and add this anywhere you want the widget to show
<?php
if ( is_active_sidebar( 'main-post' ) ) {
dynamic_sidebar( 'main-post' );
}
?>