<?php
register_sidebar();
?>
now add following code in your sidebar.php if does not exists than create one.
<aside>
<?php if ( !dynamic_sidebar() ) : ?>
<h2>Sidebar</h2>
<?php endif; ?>
</aside>
Congrats. You have a widget ready sidebar.
Code with some default and basic Styling.
for sidebar.php
<aside>
<?php if ( !dynamic_sidebar() ) : ?>
<h2>About</h2>
<p>This is my blog. i Love Wordpress.</p>
<?php wp_loginout(); ?>
<?php endif; ?>
</aside>
For functions.php
<?php
register_sidebar(array(
'before_widget' => '',
'after_widget' => '',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
?>
2 comments:
Nice widget for wordpress.
thanks for share
Wordpress is the best CMS all platform, so friendly and many benefit
i also want to share free premium theme wordpress for people
free premium themes wordpress
Maybe help something to you
thanks so much
Post a Comment