File: /var/www/vhosts/greenclinic.kz/newsite/wp-content/themes/green-clinic/page-news.php
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package asds
*/
// $categories = get_the_category( $the_post );
// $categories_name = $categories[0]->name;
// $categories_id = $categories[0]->term_id;
// $categories_slug = $categories[0]->slug;
// $the_post = get_the_ID();
$items = get_posts([
'post_type' => 'news',
'post_status' => 'publish',
'posts_per_page' => -1,
]);
get_header();
?>
<?php get_template_part( 'template-parts/content_header', 'none' ); ?>
<section class="section content_section">
<main id="primary" class="site-main container">
<?php get_template_part( 'template-parts/news', 'list', ['per_page' => -1] ); ?>
<?php
/*
the_post_navigation(
array(
'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', 'asds' ) . '</span> <span class="nav-title">%title</span>',
'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'asds' ) . '</span> <span class="nav-title">%title</span>',
)
);
// 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;
*/
?>
</main><!-- #main -->
</section>
<?php get_template_part( 'blocks/blocks' ); ?>
<?php get_footer(); ?>