Суть задачи: на главной есть несколько блока, нужно вывести в них по одной новости из разных категорий,
Пробовал таким образом:
<div class="newsart2">
<div class="block3">
<div class="titart">Главное::</div>
<?php query_posts('showposts=1&cat=9'); ?>
<?php while (have_posts()) : the_post(); ?>
<span class="art"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span><?php the_content('Подробнее...'); ?>
<?php endwhile; ?>
<?php query_posts('showposts=3&offset=1&cat=9'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
</ul>
</div>
<div class="block4">
<div class="titart">Главное::</div>
<?php query_posts('showposts=1&cat=37'); ?>
<?php while (have_posts()) : the_post(); ?>
<span class="art"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span><?php the_content('Подробнее...'); ?>
<?php endwhile; ?>
<?php query_posts('showposts=3&offset=1&cat=37'); ?>
<?php while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
</ul>
</div>
</div>
но в одном блоке пост есть, в остальных пусто
Подскажите пожалуйста как правильно будет?
спасибо, вроде разобрался:)