/** * Latest blog posts shortcode */ if( !function_exists('reales_latest_posts_shortcode') ): function reales_latest_posts_shortcode($attrs, $content = null) { extract(shortcode_atts(array( 'title' => 'Recently Listed Properties' ), $attrs)); if(isset($attrs['show']) && is_numeric($attrs['show'])) { $show = $attrs['show']; } else { $show = '4'; } $args = array( 'numberposts' => $show, 'post_type' => 'post', 'orderby' => 'post_date', 'order' => 'DESC', 'post_status' => 'publish'); $posts = wp_get_recent_posts($args, OBJECT); $return_string = '