我想知道
如何在多站点博客列表中按id隐藏博客?这是我的代码示例,它列出了3篇最新的博客文章和3篇不同的博客
<?php
$blogs = get_last_updated(\' \', 0, 3);
foreach ($blogs AS $blog) {;
switch_to_blog($blog["blog_id"]);
$lastposts = get_posts(\'numberposts=1&orderby=date\');
foreach($lastposts as $post) : setup_postdata($post);
?>
<div class="col-sm-4 blog-newest">
<!-- blog name -->
<h3><?php echo $blog_title = get_bloginfo( \'name\' ); ?></h3>
<!-- Link to blog -->
<a href="<?php echo get_page_link($post->ID); ?>">
<?php echo $post->post_title; ?>
</a>
</div>
<?php
endforeach;
restore_current_blog();
}
?>
感谢您的回答