Я использую приведенный ниже код для отображения на пользовательской странице списка сообщений из определенной категории. Я хотел бы добавить страницы внизу, но пока не получается.
Можно как-то добавить?
<?php $cat_id = 22;
$cat_link = get_category_link( $cat_id );
$cat_name = get_cat_name($cat_id); ?>
<div class="catrecent">
<?php $query = new wp_query();
$query->query('showposts=1&cat=' . $cat_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<div class="recenttitle">
<h2 class="catidtxt"> <a href="<?php echo ($cat_link); ?>" title="<?php echo ($cat_name); ?>"><?php echo ($cat_name); ?></a></h2>
<h2 class="recentposttitle"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h3>
</div>
<div class="recentpostwrap">
<?php the_post_thumbnail( 'catlarge' ); ?>
<?php the_content_limit(600,""); ?>
</div>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</div>
<ul class="posts_list">
<?php $query = new wp_query();
$query->query('offset=1&showposts=4&cat=22&paged=' . $cat_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'catmed' ); ?></a>
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>