How to Create a Custom WordPress Widget

Do you want to create your own custom widgets in WordPress? Widgets allow you to drag and drop elements into any sidebar or widget ready area of your website. In this article, we will show you how to easily create a custom WordPress widget.
For Creating Widget Section Here function.php file Edite code..

if (function_exists('register_sidebar')) {
      register_sidebar(
        array(
          'name' => 'Footer First',  
          'id' => 'Footer Frist',
          'description' => 'The main sidebar area',
          'before_widget' => '<div class="col-xl-8">',  
          'after_widget' => '</div> <!-- end col-xl-8 -->',
          // 'before_title' => '<h2>',  
          // 'after_title' => '</h2>'
        )
      );
    }

---------------------------------------------------------

if (function_exists('register_sidebar')) {
      register_sidebar(
        array(
          'name' => 'Footer second',  
          'id' => 'Footer second',
          'description' => 'The main sidebar area',
          'before_widget' => '<div class="col-xl-8">',  
          'after_widget' => '</div> <!-- end col-xl-8 -->',
          // 'before_title' => '<h2>',  
          // 'after_title' => '</h2>'
        )
      );
    }

---------------------------------------------------------

if (function_exists('register_sidebar')) {
      register_sidebar(
        array(
          'name' => 'Footer third',  
          'id' => 'Footer third',
          'description' => 'The main sidebar area',
          'before_widget' => '<div class="col-xl-4 top">',  
          'after_widget' => '</div> <!-- end col-xl-4 top-->',
          // 'before_title' => '<h2>',  
          // 'after_title' => '</h2>'
        )
      );
    }

Do you want to create your own custom widgets in WordPress? Widgets allow you to drag and drop elements into any sidebar or widget ready area of your website. In this article, we will show you how to easily create a custom WordPress widget.

Calling Footer in file

<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer-First')) : ?>
<?php endif; ?>
---------------

<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer-second')) : ?>
<?php endif; ?>
---------------

<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer-third')) : ?>
<?php endif; ?>

We hope this article helped you learn how to create custom post types in WordPress.

niteshbhardwaj.com in Delhi NCR, niteshbhardwaj.com in Laxmi nagar, niteshbhardwaj.com in Ganesh nagar, niteshbhardwaj.com in shakarpur, niteshbhardwaj.com in Ramesh park, niteshbhardwaj.com in Nirman Vihar, niteshbhardwaj.com in Geeta colony, niteshbhardwaj.com in Mandawali, niteshbhardwaj.com in west vinod nagar, niteshbhardwaj.com in karkardooma, niteshbhardwaj.com in Preet vihar, niteshhardwaj.com in Shadipur, niteshbhardwaj.com in Rajouri garden, niteshbhardwaj.com in Bara khamba, niteshbhardwaj.com in yamuna bank, niteshbhardwaj.com in joshi colony, niteshbhardwaj.com in Chandar vihar, niteshbhardwaj.com in Manglam School, niteshbhardwaj.com in Madhu vihar, niteshbhardwaj.com in Mayur vihar, niteshbhardwaj.com in Alla colony, niteshbhardwaj.com in Dwarka, niteshbhardwaj.com in Noida, niteshbhardwaj.com in Greater Noida