@defreshy

Как выводить записи не на главной, а на отдельной странице?

Тема Root, записи размещены на главной, как их выводить их на отдельной странице?
Когда код с главной переношу на отдельную страницу, записи не отображаются.
<div id="primary" class="content-area">
		<main id="main" class="site-main">

		<?php if ( have_posts() ) : ?>

			<?php if ( is_home() && ! is_front_page() ) : ?>
				<header>
					<h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
				</header>
			<?php endif; ?>

            <?php if ( 'top' == root_get_option( 'structure_home_position' ) ) get_template_part( 'template-parts/home', 'content' ); ?>

            <?php
            if ( is_front_page() || is_home() ) {
                if ( root_get_option( 'structure_slider_width' ) == 'content' ) {
                    $is_show_on_paged   = root_get_option( 'structure_slider_show_on_paged' );
                    if ( ! is_paged() || ( $is_show_on_paged && is_paged() ) ) {
                        get_template_part( 'template-parts/slider', 'posts' );
                    }
                }
            }
            ?>

            <?php get_template_part( 'template-parts/layout/archive', root_get_option( 'structure_home_posts' ) ); ?>

            <?php the_posts_pagination(); ?>

            <?php if ( 'bottom' == root_get_option( 'structure_home_position' ) ) get_template_part( 'template-parts/home', 'content' ); ?>


        <?php else : ?>

			<?php get_template_part( 'template-parts/content', 'none' ); ?>

		<?php endif; ?>

		</main><!-- #main -->
	</div><!-- #primary -->

В чем может быть причина?
  • Вопрос задан
  • 54 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы