add_shortcode is wp keyword.
// recent-posts is going to be our shortcode.
add_shortcode('recent-posts', 'recent_posts_function');
// This function is taking action when recent post shortcode is called.
function recent_posts_function() {
query_posts(array('orderby' => 'date', 'order' =&...