Monday, May 3, 2010

Create a Widget Function Wordpress

Create a Widget Function


Paste this code to the theme


<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('photos') ) : else : ?>

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

<?php endif; ?>


Add the to the functions.php


<?php


if ( function_exists('register_sidebar') )

register_sidebar(array(

'name' => 'photos',

'before_widget' => '<div id="%1$s" class="widget">',

'after_widget' => '</div>',

'before_title' => '<h2 class="sidebartitle">',

'after_title' => '</h2>',

));

?>

No comments:

Post a Comment