I'm using the Newsletter plugin (http://wordpress.org/extend/plugins/newsletter/) to compose e-mail newsletters. Using the "auto-compose" feature to pull website data via the theme included with the plugin, which I have begun to customise.

It's pulling posts just fine, which is a good start - but I would also like to pull some data that a custom widget on our site is displaying. I'm fairly new to Wordpress and the custom widget in question was not developed by me. Can I include a specific widget via my theme template?


  • I've tried using this code, but it's not pulling anything. <?php the_widget($widget_name); ?>
    – Bill
    Commented May 17, 2011 at 14:27

1 Answer 1


You may already know this, but you need to specify the widget's class name as the $widget_name variable in the template tag. For example,

Depending on the widget, you may also need to add parameters to the_widget() to get it to display properly — see notes on thewidget() $instance and $args in the codex. http://codex.wordpress.org/Function_Reference/the_widget

Alternatively, you can use a plugin like Widgets on Pages, which will let you include a widget anywhere using by using a shortcode like this: [widgets_on_pages id=WidgetName] http://wordpress.org/extend/plugins/widgets-on-pages/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.