#10612 closed enhancement (wontfix)
Extract recent comments code out of the widget
Reported by: | Viper007Bond | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 2.9 |
Component: | Template | Keywords: | needs-patch |
Focuses: | Cc: |
Description
For those of us who don't use a widgetized sidebar, there's no easy way to display recent comments without copy/pasting the widget's code or using a plugin.
The code used in the widget should be extracted into function(s) that can be used outside of the widget.
Change History (5)
#3
in reply to:
↑ 1
@
15 years ago
Replying to azaozz:
Perhaps have a look at
the_widget($widget, $instance = array(), $args = array())
. It would output an instance of a widget. For recent comments it would bethe_widget( 'WP_Widget_Recent_Comments' );
.
I had briefly thought about trying to get the widget run on it's own, but then I thought it wouldn't work due to settings, etc.
Good to know (I ended up using a plugin). Thanks!
Note: See
TracTickets for help on using
tickets.
Perhaps have a look at
the_widget($widget, $instance = array(), $args = array())
. It would output an instance of a widget. For recent comments it would bethe_widget( 'WP_Widget_Recent_Comments' );
.