こんにちは、最初のワードプレス Web サイトを作成しようとしています。2 つの異なるカテゴリからコウモリの投稿を取り込み、同じページに表示しようとしています。投稿を元に戻しますが、ランダムな順序で配置し続けます。あるカテゴリからの投稿があり、別のカテゴリからの投稿が下にあることを望んでいます。
これが私がこれまでに得たものです
<?php get_head(); ?>
<div id="container">
<?php get_header(); ?>
<?php get_banner(); ?>
<div class=" center content" role="main">
<div id="posts">
<div class="news">
<?php query_posts('catname=news&showposts=3'); while (have_posts()) : the_post(); the_title(); the_content();
endwhile;?>
<div class="clear"></div>
</div>
<div class="msghead">
<?php query_posts('catname=msghead&showposts=1'); while (have_posts()) : the_post(); the_title(); the_content();
endwhile;?>
</div>
</div>
</div>
<div class="sidebardiv">
<?php get_sidebar(); ?>
<div class="clear">
</div>
</div>
</div>
<?php get_footer(); ?>
</div>