Made a template for WP on the page displays the records and attached documents, but completely forgot that when there are a lot of them then the page will turn into a canvas, how do I paginate, the page itself does not work out right now
<section> <?php $documents = get_field('documents'); $mime_types = array('application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'doc.png', 'application/pdf' => 'pdf.png', 'application/msword' => 'doc.png', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xls.png', 'application/zip' => 'zip.png', 'application/vnd.ms-excel' => 'xls.png'); foreach ($documents as $documents_group) { ?> <div class="document-grpup"> <h4><?php echo $documents_group['header'] ?></h4> <p class="description"><?php echo $documents_group['description']; ?></p> <?php $files = $documents_group['files']; if (count($files) > 0) { foreach ($files as $file) { ?> <a href="<?php echo( $file['file']['url'] ); ?>"><img src="<?php echo get_bloginfo('template_url'); ?>/img/documentIcons/<?php echo $mime_types[$file['file']['mime_type']]; ?>" height="41" width="32" alt="pdf" class="icon"> <span><?php if ($file['file_name'] != '') { echo $file['file_name']; } else { echo( $file['file']['title'] ); } ?></span></a> <?php } } else { echo 'Документы отсутствуют'; } ?> </div> <?php } ?> </section>