<?php the_widget('WP_Widget_Recent_Posts', array('number' => 4), $args); ?>
or:
<?php the_widget('WP_Widget_Recent_Posts', 'number=4', $args); ?>
http://codex.ww.wp.xz.cn/Function_Reference/the_widget#Recent_Posts_widget
http://codex.ww.wp.xz.cn/Function_Reference/the_widget
instance
(array or query-string-style) the widget’s instance settings. See each widget below.
Thanks very much, I did find both those links and I did read everything that was there about doing this, but it doesn’t give examples of how it is to be presented and not very intuitive. Can you advise what I would do if I wanted to change the title because right now is it called “Recent Posts”, or if I wanted to remove the title completely?
Thank you so much!
<?php the_widget('WP_Widget_Recent_Posts', array('number' => 4, 'title' => 'Some Other Title'), $args); ?>
or you could try with a single space character as title – however this will still output the ‘before_title’ and ‘after_title’ html tags:
<?php the_widget('WP_Widget_Recent_Posts', array('number' => 4, 'title' => ' '), $args); ?>
or to get rid of the html title tags and show no title:
<?php the_widget('WP_Widget_Recent_Posts', array('number' => 4, 'title' => ' '), array('before_title' => '', 'after_title' => '')); ?>
Thank you again for your help and fast response. 🙂