Word Count: 122
  • Post category:Codings
  • Post last modified:2020-08-22
  • Add the following codes to the part of your theme that you want to widgetize.
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar("Name of Widgetized Area")) : ?>
<?php endif;?>
  • Register the widget in functions.php
if (function_exists('register_sidebar'))
    register_sidebar(array(
        'name' => 'Name of Widgetized Area',
        'before_widget' => '<div class = "widgetizedArea">',
        'after_widget' => '</div>',
        'before_title' => '<h4>',
        'after_title' => '</h4>',
        )
);
  • Change ‘Name of Widgetized Area’, ‘widgetizeArea’ accordingly.
  • Go to Dashboard -> Appearance -> Widgets. You should now see the “Name of Widgetized Area” section on the right side of your screen.