<div class="subpage articles">
    <?php require(get_template_directory() . '/subpage-top.php'); ?>
    <?php require(get_template_directory() . '/subpage-calculator.php'); ?>

    <div class="content">
        <h1>Rabaty i promocje</h1>

        <?php

        global $wp_query;
        $wp_query = new WP_Query(array(
            'posts_per_page' => 5,
            'paged' => getPaginationPageNumber()
        ));

        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>
                <div class="article">

                    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

                    <p><?php echo wpautop(get_the_content('Czytaj więcej...', true)); ?></p>

                </div>
            <?php
            }

            pagination_nav();
        }
        ?>
    </div>
</div>