如何使用 Divs 而不是 Posts 进行分页?

How to paginate using Divs instead of Posts?

我有一个简单的模板页面,我刚刚添加到我的网站上,并且每个月都会手动添加一个新时事通讯的部分。但是,当我收到相当多的时事通讯时,将要查看该页面的用户将不得不不断向下滚动才能找到时事通讯。

<?php get_header();?>
<div id="main" class="defaultContentWidth">
<div id="wrapper-row">
<div id="primary">
    <div id="content">
<?php the_breadcrumb();?>
        <h1 class="entry-title"><?php the_title();?></h1>
        <?php if(have_posts()) :
      while(have_posts()) : the_post();?>
        <div class="newscont"><?php the_content();?></div>
      <?php endwhile;
        endif;?>

        <div class="contnewslist">
        <div class="newsblock">
            <h2>NEWSLETTER 1</h2>
            <i>December 01, 2014</i>
            <p>This is the December edition of the newsletter. Featuring in this newsletter is ...</p>
            <input type="submit" value="Download" id="download" class="newsdownload">
        </div>
        <div class="newsblock">
            <h2>NEWSLETTER 2</h2>
            <i>January 01, 2015</i>
            <p>This is the January edition of the newsletter. Featuring in this newsletter is ...</p>
            <input type="submit" value="Download" id="download" class="newsdownload">
        </div>
        </div>

     </div>
  </div>
 </div>
</div>
<?php get_footer();?>

因此,我想知道如何在页面上添加基本分页 'Previous 1 2 Next' 按钮,并将时事通讯的分区数量限制为每页大约五个,除非请记住 这些不是帖子

编辑 1

我需要知道如何计算 div 的数量,将其限制为每页五个 div,并根据新闻稿 div 的数量生成更多页面!

我想要的那种分页示例是 -

我认为如果它们在数据库中,最好的方法是使用 PHP 和 Jquery 分页。例如,假设您有 100 份时事通讯,您可以像本教程 PHP Tutsplus tutorial on pagination 那样使用 php 分页并将其分成 5 个,如果时事通讯很大,请按此方式进行。缺点是每次页面更改都要调用服务器。如果时事通讯相当小,则混合 jquery,让 php 计算总数,忽略前 15 或 20 个并让 jquery 将它们分成 5 个,也许ajax 在加载第 5 页时调用以获取下一个 15.jquery 将能够处理该问题并在请求第 6 页时添加 onclick 以无缝更新 div Jquery 可以找到分页插件 here, sitepoint