You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.3 KiB
78 lines
2.3 KiB
<?php
|
|
/**
|
|
* Template Name: Seite mit Blog (cat)
|
|
*
|
|
*/
|
|
|
|
get_header(); ?>
|
|
|
|
<div id="primary" class="content-area">
|
|
<main id="main" class="site-main" role="main">
|
|
|
|
<?php
|
|
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
|
?>
|
|
|
|
<?php
|
|
if(!get_query_var('paged')) {
|
|
while (have_posts()) :
|
|
the_post();
|
|
|
|
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() || '0' != get_comments_number()) :
|
|
comments_template();
|
|
endif;
|
|
|
|
//the_post_navigation(
|
|
// array(
|
|
// 'next_text' => '<span class="post-title">%title <i class="fa fa-chevron-right"></i></span>',
|
|
// 'prev_text' => '<i class="fa fa-chevron-left"></i> <span class="post-title">%title</span>',
|
|
// )
|
|
//);
|
|
|
|
endwhile; // end of the loop.
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
//var_dump(get_query_var('pagename'));
|
|
$args = array(
|
|
'category_name' => get_query_var('pagename'),
|
|
'paged' => $paged,
|
|
'posts_per_page' => 9
|
|
);
|
|
|
|
query_posts($args);
|
|
?>
|
|
|
|
<div id="related-posts">
|
|
|
|
<?php
|
|
|
|
while ( have_posts() ) :
|
|
the_post();
|
|
|
|
/*
|
|
* Include the Post-Format-specific template for the content.
|
|
* If you want to override this in a child theme, then include a file
|
|
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
|
*/
|
|
get_template_part( 'template-parts/content', 'content' );
|
|
endwhile;
|
|
the_posts_pagination(
|
|
array(
|
|
'prev_text' => '<i class="fa fa-chevron-left"></i> ' . __( 'Newer posts', 'sparkling' ),
|
|
'next_text' => __( 'Older posts', 'sparkling' ) . ' <i class="fa fa-chevron-right"></i>',
|
|
)
|
|
);
|
|
|
|
?>
|
|
</div>
|
|
</main><!-- #main -->
|
|
</div><!-- #primary -->
|
|
|
|
<?php
|
|
get_sidebar();
|
|
get_footer();
|
|
|