Всем привет, ни как не пойму, что не так с кодом... Глаза уже замылились видимо...
Почему-то не хочет он подгружать is_page() -
template-parts/content-page/content-page
Всё останавливается на
/template-parts/content-page/content-court-msk-jurisdiction
Сам код:
<?php if (is_page('kontakty')): ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
//echo '<div style="border: 1px dotted gray; background-color: #ffffd975; margin: 0; padding: 0;">
// <p style="color: black;">Это страница - page.php</p>';
// Include the page content template.
get_template_part( 'template-parts/content-page/content-kontakt-page', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content/content', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// echo '</div>';
// End of the loop.
endwhile;
?>
<?php// elseif (is_page(array('notary'=>$post->ID))): ?>
<?php elseif (is_singular('notary')): ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
//echo '<div style="border: 1px dotted gray; background-color: #ffffd975; margin: 0; padding: 0;">
// <p style="color: black;">Это страница - page.php</p>';
// Include the page content template.
get_template_part( 'template-parts/content-page/content-page-notary', 'page-notary' );
// echo '***********';
// get_template_part( 'template-parts/content/content', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// echo '</div>';
// End of the loop.
endwhile;
?>
<?php elseif (is_page(array('court-msk-jurisdiction'=>$post->ID))): ?>
<?php //elseif (is_page(array('laws'=>$post->ID))): ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
//echo '<div style="border: 1px dotted gray; background-color: #ffffd975; margin: 0; padding: 0;">
// <p style="color: black;">Это страница - page.php</p>';
// Include the page content template.
get_template_part( '/template-parts/content-page/content-court-msk-jurisdiction', 'page' );
// get_template_part( 'template-parts/content-page/content-page-tests', 'page' );
// get_template_part( 'template-parts/content-page/content-laws-page', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content/content', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// echo '</div>';
// End of the loop.
endwhile;
?>
<?php elseif (is_page(array('zakony'=>$post->ID))): ?>
<?php // elseif (is_page(array('zakony'=>$post->ID))): ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
// Include the single post content template.
get_template_part( 'template-parts/content-laws/content-zakon', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
if ( is_singular( 'attachment' ) ) {
// Parent post navigation.
the_post_navigation( array(
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'mylbo' ),
) );
} elseif ( is_singular( 'post' ) ) {
// Previous/next post navigation.
the_post_navigation( array(
'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'mylbo' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Next post:', 'mylbo' ) . '</span> ' .
'<span class="post-title">%title</span>',
'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'mylbo' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Previous post:', 'mylbo' ) . '</span> ' .
'<span class="post-title">%title</span>',
) );
}
// End of the loop.
endwhile;
?>
<?php elseif (is_page(array('kodeksy-rf'=>$post->ID))): ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
// Include the single post content template.
get_template_part( 'template-parts/content-laws/content-kodeks', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
if ( is_singular( 'attachment' ) ) {
// Parent post navigation.
the_post_navigation( array(
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'mylbo' ),
) );
} elseif ( is_singular( 'post' ) ) {
// Previous/next post navigation.
the_post_navigation( array(
'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'mylbo' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Next post:', 'mylbo' ) . '</span> ' .
'<span class="post-title">%title</span>',
'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'mylbo' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Previous post:', 'mylbo' ) . '</span> ' .
'<span class="post-title">%title</span>',
) );
}
// End of the loop.
endwhile;
?>
<?php elseif (is_page(array('plenumy-vs-rf'=>$post->ID))): ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
// Include the single post content template.
get_template_part( 'template-parts/content-laws/content-plenum', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
if ( is_singular( 'attachment' ) ) {
// Parent post navigation.
the_post_navigation( array(
'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'mylbo' ),
) );
} elseif ( is_singular( 'post' ) ) {
// Previous/next post navigation.
the_post_navigation( array(
'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'mylbo' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Next post:', 'mylbo' ) . '</span> ' .
'<span class="post-title">%title</span>',
'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'mylbo' ) . '</span> ' .
'<span class="screen-reader-text">' . __( 'Previous post:', 'mylbo' ) . '</span> ' .
'<span class="post-title">%title</span>',
) );
}
// End of the loop.
endwhile;
?>
<?php elseif (is_page(array('notary-msk'=>$post->ID))): ?>
<?php //elseif (is_page(array('laws'=>$post->ID))): ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
//echo '<div style="border: 1px dotted gray; background-color: #ffffd975; margin: 0; padding: 0;">
// <p style="color: black;">Это страница - page.php</p>';
// Include the page content template.
get_template_part( 'template-parts/content-page/content-notary-page', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content/content', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// echo '</div>';
// End of the loop.
endwhile;
?>
<?php elseif (is_page()): ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();
//echo '<div style="border: 1px dotted gray; background-color: #ffffd975; margin: 0; padding: 0;">
// <p style="color: black;">Это страница - page.php</p>';
// Include the page content template.
get_template_part( 'template-parts/content-page/content-page', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content/content', 'page' );
// echo '***********';
// get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
comments_template();
}
// echo '</div>';
// End of the loop.
endwhile;
?>
<?php endif; ?>