Register widget in functions.php
// ========================================================================= // REGISTER NEW WIDGET // ========================================================================= function custom_widgets_init() { register_sidebar( array( 'name' => 'Custom Widget', 'id' => 'custom-widget-id', 'before_widget' => '<div class="custom-widget">', 'after_widget' => '</div>', 'before_title' => '<h4 class="custom-title">', 'after_title' => '</h4>', ) ); } add_action( 'widgets_init', 'custom_widgets_init' );
Place this code where you want to appear the widget
<?php dynamic_sidebar('Custom Widget'); ?>