Stefan Di Iorio
asked 10 years ago

I’m curious how to go about calling the dw-focus-slider (or dw_focus_top_posts object) from code.

Stefan Di Iorio
replied 10 years ago

So far, this is the best I could do.

$myslider = new dw_focus_top_posts();
$instance[‘number’] = 5;
echo “

echo $myslider->widget($args, $instance);
echo “


1 Answers
answered 10 years ago

Hi Stefan,

You can use the_widget() function that was made by WordPress ( ). It’s the shortest way to call a widget outside of a sidebar.

Powered by DW Question & Answer Pro