0

I have default widget available called "Recent Post" created by theme. I want to call that widget in my custom template which I made.

I am trying in following way , But that is not working.

 <?php get_widget( 'WP_Widget_Recent Posts' ); ?> 

enter image description here

1 Answer 1

0

Try this

<?php the_widget( 'WP_Widget_Recent_Posts', array('number' => 10, 'title' => 'My Title Goes Here'), $args ); ?>
3

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.