WordPress Theme Development 6 – Theme Functions

The WordPress theme functions file, functions.php, basically acts like a plugin, adding more features to WordPress theme. Currently I added the code as following to this file for supporting widget in dynamic sidebar.

1
2
3
4
5
6
7
8
9
10
11
12
13
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Your_Theme
  5. */
  6. if ( function_exists('register_sidebar') )
  7. register_sidebar(array(
  8. 'before_widget' => '<li id="%1$s" class="widget %2$s">',
  9. 'after_widget' => '</li>',
  10. 'before_title' => '',
  11. 'after_title' => '',
  12. ));
  13. ?>

Related Posts

References

3 Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">