ildi-wp/category.php

36 lines
928 B
PHP
Raw Permalink Normal View History

2018-08-10 18:48:11 -05:00
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<?php get_header(); ?>
<body>
<a class="skip-nav sr-only" href="#main-content">Skip to main</a>
<?php get_template_part('global-head'); ?>
<main id="main-content" class="container" role="main">
2018-08-13 15:24:11 -05:00
<?php
$cat = array_shift(get_the_category());
$query = new WP_Query( array(
'name' => $cat->slug,
'post_type' => 'page'
));
$page = array_shift($query->get_posts());
?>
<section>
<h1><?php echo ($page->post_title) ? $page->post_title : $cat->name; ?></h1>
<?php echo apply_filters('the_content', $page->post_content); ?>
</section>
2018-08-10 18:48:11 -05:00
<div class="grid col-100">
<?php get_template_part('loop'); ?>
</div>
<?php get_template_part('pagination'); ?>
</main>
<?php // get_sidebar(); ?>
<?php get_footer(); ?>
</body>
</html>