Site icon WP Smith

How to Call the Title(s) of Your Most Recent Blog Posts

Probably the easiest way (at least that I've found so there probably is a much easier way native to WordPress) is to get the Recent Post plugin By Nick Momrik, which allows for the PHP call

[php]<code><?php mdv_recent_posts(); ?>[/php]

in your posts or templates. It also can be expanded to include other paramaters. For example,

[php]<?php mdv_recent_posts(1, '', '<br />', true, 0, true, false); ?>[/php]

The parameters:

So,

[php] <?php mdv_recent_posts($no_posts, $before, $after, $hide_pass_post, $skip_posts, $show_excerpts, $include_pages); ?> [/php]

Now, if you wish to use this in one of your blog posts or sidebar widget as I did on one of my sites, you will need another plugin to allow you to use PHP code in your Visual/HTML editor (though the Visual part will have to be disabled) or in your sidebar. Two really good ones are: