In this post i am going to show you how to create custom widget for footer in wordpress.
First of all go to theme editor (Appearance > theme editor). select your activated theme and open functions.php file.
Step 1: Add this code to your functions file.
add_action( 'widgets_init', 'my_register_sidebars' ); function my_register_sidebars() { register_sidebar( array( 'id' => 'footer_column_one', 'name' => __( 'Footer First Column' ), 'description' => __( 'this is the first column of footer' ), ) ); }
Step 2: Add this to where you want to show your sidebar
Note: this will be in php tag
dynamic_sidebar( 'footer_column_one' );