• hi.
    i am not a english one so sorry for world problems.
    i need to show last posts from all blogs(blog.mydomain.com) in the front page(mydomain.com).
    but there is a problem! :
    any new blog have a hello world post, so if any new blog created the hello world will be displayed. (now you think 10 new blog… this will show 10 hello world!!)
    is there any way to don’t show hello world post?

    the code i use for show recent posts(but this show the hello world! 🙁 ) :

    <ul>
    <?php
    	$updates = get_last_updated(' ', 0, 10);
    	foreach($updates as $up){
    		if (  0 == $up['blog_id'] || 1 == $up['blog_id'] )
    			$post_prefix= $table_prefix .'posts';
    		else
    			$post_prefix  = $table_prefix  . $up['blog_id'] . '_posts';
    		$post = $wpdb->get_results($wpdb->prepare("SELECT <code>post_title</code>,<code>ID</code> FROM <code>$post_prefix</code> WHERE <code>post_status</code>='publish' AND<code>post_type</code>='post' ORDER BY <code>ID</code> DESC LIMIT 1;"));
    		if(is_object($post[0]))
    			printf('<li><a href="%s" title="%s">%2$s</a></li>',get_blog_option( $up['blog_id'],'siteurl').'/?p='.$post[0]->ID  ,$post[0]->post_title);
    	}
    ?>
    </ul>

    [No bumping, thank you.]

  • The topic ‘show recent network post except Hello World!’ is closed to new replies.