This commit is contained in:
Roman Pyrih
2025-09-23 15:47:30 +02:00
parent ce4d458162
commit 85d294c680
16 changed files with 4578 additions and 2203 deletions

View File

@@ -4,35 +4,81 @@
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package brpfinanse
* @package BRPP_prawo_podatki
*/
get_header();
?>
<main id="primary" class="site-main">
<main id="primary" class="site-main page-single-post">
<div class="box-1">
<div class="container">
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', get_post_type() );
if (true == false) {
the_post_navigation(
array(
'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', 'brpp-prawo-podatki' ) . '</span> <span class="nav-title">%title</span>',
'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'brpp-prawo-podatki' ) . '</span> <span class="nav-title">%title</span>',
)
);
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
}
endwhile; // End of the loop.
?>
</div>
</div>
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', get_post_type() );
the_post_navigation(
array(
'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', 'brpfinanse' ) . '</span> <span class="nav-title">%title</span>',
'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'brpfinanse' ) . '</span> <span class="nav-title">%title</span>',
)
$args = array(
'post_type' => 'post',
'posts_per_page' => 3,
'orderby' => 'date',
'order' => 'DESC',
'post__not_in' => array(get_the_ID()),
);
$other_posts = new WP_Query($args);
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
if ($other_posts->have_posts()) :
?>
<div class="box-2">
<div class="container">
<div class="row" box-title="Blog">
<div class="box-head">
<h2>Zobacz też inne wpisy</h2>
<div class="other-posts">
<?php
while ($other_posts->have_posts()) : $other_posts->the_post();
$image = get_the_post_thumbnail_url(get_the_ID(), 'medium');
$title = get_the_title();
$link = get_permalink();
get_template_part(
'inc/template-article-card', null, [
'image' => $image,
'title' => $title,
'link' => $link
]
);
endwhile;
wp_reset_postdata();
?>
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
</main><!-- #main -->
<?php