Не получается выводить внутри самого поста (single.php) кнопки по типу "Следующая" и "Предыдущая" статья.
Пробовал писать:
<?php next_post_link('<strong>%link</strong>'); ?>
Но, не выводит.
Код самой статьи:
<div class="site-wrapper">
<section class="post">
<div class="container-blog">
<? if( have_posts() ): while( have_posts() ): the_post(); ?>
<img src="<?php the_post_thumbnail_url(); ?>" alt="Картинка статьи" class="post__img">
<div class="post__info">
<p class="post__theme">
<?php
foreach((get_the_category()) as $category) {
echo $category->cat_name . ' ';
}
?>
</p>
<p class="post__publication">
Дата публикации: <span class="post__publication-date"><?php echo get_the_date(); ?></span>
</p>
</div>
<h1 class="post__title">
<?php the_title(); ?>
</h1>
<div class="post__content">
<?php the_field('post__content', false, false); ?>
</div>
<?php endwhile; endif; ?>
<div class="post__bottom">
<div>
<?php next_post_link('Next Page') ?>
</div>
<?php if ($return_url = wp_get_referer()) : ?>
<a href="<?php echo esc_url( $return_url ); ?>" class="post__btn">
Вернуться
</a>
<?php else : ?>
<a href="<?php echo get_page_link(1262); ?>" class="post__btn">
Вернуться
</a>
<?php endif; ?>
</div>
</div>
<img src="<?php echo get_template_directory_uri(); ?>/assets/img/blog/first-plash.png" alt="Плашка" class="post__first-plash" aria-hidden="true">
<img src="<?php echo get_template_directory_uri(); ?>/assets/img/blog/second-plash.png" alt="Плашка" class="post__second-plash" aria-hidden="true">
</section>
<section class="partners">
<div class="container">
<h2 class="partners__title"
data-aos="slide-text"
data-aos-easing="ease-in-out"
data-aos-duration="1000"
data-aos-delay="1000"
data-aos-once="true"
data-aos-offset="0">
<?php the_field('partners__title', 'option'); ?>
</h2>
<div class="partners__table">
<?php if( have_rows('partners__table', 'option') ): while ( have_rows('partners__table', 'option') ) : the_row() ?>
<div class="partners__table-item" data-aos="fade-up" data-aos-easing="ease-in-out" data-aos-duration="1000" data-aos-delay="<?php the_sub_field('partners__table-item-delay', 'option'); ?>" data-aos-once="true" data-aos-offset="0">
<img src=" <?php the_sub_field('partners__table-item', 'option'); ?> " alt="" class="partners__table-img">
</div>
<?php endwhile; endif; ?>
</div>
</div>
</section>
<button class="news-try btn-pink-blue">
<?php the_field('news-try', 'option'); ?>
</button>
</div>