<?php
/*
Template Name: Шаблон страницы рекламодателей
*/

$advertisers = new WP_Query([
    'post_type' => 'advertiser',
    'posts_per_page' => 10,
    'orderby' => 'date',
    'order' => 'ASC'
]);

?>

<?php get_header(); ?>
<div class="content-middle articles-wrapper">
    <?php get_template_part('partials/rubrics-mobile'); ?>
    <div class="section-title">
        <h1 class="section-title__title"><?= the_title() ?></h1>
    </div>
    <div class="articles-preview">
        <? get_template_part('content-advertiser', null, ['advertiser' => $advertisers]) ?>
       <?php get_template_part('partials/related-posts', '', array('posts_per_page' => 8) ); ?>
    </div>
    <a href="<?= home_url() ?>" class="articles-preview__show-next">На главную</a>
    <div class="articles__spacer-container">
        <div class="articles__spacer"></div>
        <div class="articles__spacer"></div>
    </div>
</div>

<?php
get_footer(); ?>