Possible Duplicate:
The result of a shortcode appear BEFORE page content
short code output too early
I got this shortcode for display my blog posts on my page, but the EXCERPT and the COMMENTS are displaying on the top of my page. Anyone has any ideia why is doing that?
/// Recent Blog Posts
add_shortcode('recent_blog_posts', 'shortcode_recent_blog_posts');
function shortcode_recent_blog_posts($atts) {
$str = '';
$args = array( 'numberposts' => 3, 'post_status'=>"publish",'post_type'=>"post",'orderby'=>"post_date");
$postslist = get_posts( $args );
foreach ($postslist as $post) : setup_postdata($post);
$str .= '<div id ="article-section-box2" class="span3">';
$str .= '<div id= "image1" class="image-arcticle">';
$str .= get_the_post_thumbnail($post->ID, '');
$str .= '</div>';
$str .='<p class ="orange16-no-bold">'.get_the_title($post->ID,'').'</p>';
$str .='<p class="date">13 Feb 2012 - <h6 class="orange-title">'.comments_popup_link('0 Comments', '1 Comment', '% Comments').';</h6></p>';
$str .='<p class="article_text">'.the_excerpt("child_of=8d").'</p>';
$str .='</div>';
endforeach;
return $str;
}