First of all place this code in function.php file to register a widget. Make sure that this widget name is unique and different for each.
after this, You can place this below code where you want to show the widget content:
if (function_exists('register_sidebar')) { register_sidebar(array( 'name' => 'Extra Widgets', 'id' => 'extra-widgets', 'description' => 'The extra widgets for your website.', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2>' )); }
after this, You can place this below code where you want to show the widget content:
<?php
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Extra Widgets')) :
endif; ?>
Custom Widget Areas for WordPress is available to download: pluginsweb.com/2016/01/05/download-custom-widget-areas-for-wordpress/
ReplyDelete