I’m curious how to go about calling the dw-focus-slider (or dw_focus_top_posts object) from code.
You can use the_widget() function that was made by WordPress ( http://codex.wordpress.org/Function_Reference/the_widget ). It’s the shortest way to call a widget outside of a sidebar.
Please login or Register to submit your answer
replied 9 years ago
So far, this is the best I could do.
$myslider = new dw_focus_top_posts();
$instance[‘number’] = 5;
echo $myslider->widget($args, $instance);