Skip to content
wiki.fftac.org

Category

**Site relevance:** 2IA.org

**Memory type:** theme source memory

**Source path:** 2IA.org/wp-content/themes/twoia-intelligence/category.php

**Size:** 1.1 KB

Summary

Category archive template.

Source Preview

This source file is short enough to preview directly on its source-memory page.

<?php
/**
 * Category archive template.
 *
 * @package TwoIA
 */

get_header();
?>
<section class="section section--archive">
	<header class="archive-header archive-header--category">
		<p class="eyebrow"><?php esc_html_e( 'Category dossier', 'two-identities-anonymous' ); ?></p>
		<h1><?php echo esc_html( single_cat_title( '', false ) ); ?></h1>
		<?php $twoia_category_description = category_description(); ?>
		<?php if ( $twoia_category_description ) : ?>
			<div class="archive-description"><?php echo wp_kses_post( $twoia_category_description ); ?></div>
		<?php else : ?>
			<p><?php esc_html_e( 'Filtered research for this 2IA subject area.', 'two-identities-anonymous' ); ?></p>
		<?php endif; ?>
	</header>
	<?php if ( have_posts() ) : ?>
		<div class="grid grid--cards archive-grid">
			<?php
			while ( have_posts() ) :
				the_post();
				get_template_part( 'template-parts/content', 'card' );
			endwhile;
			?>
		</div>
		<?php twoia_posts_pagination(); ?>
	<?php else : ?>
		<?php get_template_part( 'template-parts/content', 'none' ); ?>
	<?php endif; ?>
</section>
<?php
get_footer();