Tip: add a widget anywhere with the_widget()
Here’s a very useful tip for everyone comfortable with customizing their WordPress themes: you can add any widget anywhere on your site, not just in your sidebar or widgetized areas, using the template tag the_widget.
Here’s the syntax:
<?php the_widget($widget, $instance, $args); ?>
This post by Shailan explains how to find the widget class name and arguments to use in the code. Refer to the Codex for the names of the default widgets. Want to create your own widget? Valums shows you how.
Related Posts
- Previous post: Ian Stewart & Viper007Bond join Automattic; “Theme Team” in the works
- Next post: Tip: use shortcodes anywhere



