47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php get_header();
|
|
|
|
// Включить вывод всех ошибок
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors', 1);
|
|
ini_set('display_startup_errors', 1);
|
|
|
|
|
|
// Ваш код...
|
|
?>
|
|
|
|
<?php
|
|
$qo = get_queried_object();
|
|
echo '<pre>';
|
|
print_r($qo);
|
|
echo '</pre>';
|
|
?>
|
|
|
|
|
|
<div class="content-middle articles-wrapper">
|
|
<?php get_template_part('partials/rubrics-mobile'); ?>
|
|
<div class="section-title desktop">
|
|
<?php
|
|
if (is_category()):
|
|
$category = get_the_category();
|
|
$title = !empty($category) ? $category[0]->name : get_the_title();
|
|
?>
|
|
<h1 class="section-title__title"><?= $title ?></h1>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div class="articles-preview">
|
|
<?php
|
|
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
|
|
$args = array(
|
|
'post_type' => 'post',
|
|
'posts_per_page' => 10,
|
|
'paged' => $paged
|
|
);
|
|
$query = new WP_Query($args);
|
|
|
|
?>
|
|
<?php get_template_part('partials/post-list', null, ['query' => $wp_query]); ?>
|
|
</div>
|
|
<?php custom_pagination(); ?>
|
|
</div>
|
|
<?php get_footer(); ?>
|