category.php File for Child Theme
<?php
/**
* The template for displaying Archive pages.
*
* Used to display category archive pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage ChurchThemes
*
===================================================================================================
Trinity child theme
===================================================================================================
*/
//varible declarations
$post_settings = get_option('ct_post_settings');
$ct_post_archive_layout = $post_settings['archive_layout'];
get_header(); //loads logo and menu parts
?>
<div id="ribbon" class="page">
<div class="container_12 grid-container content">
<div class="ribbon-wrapper">
<div class="grid_6 grid-50 alpha">
<h1><?php single_cat_title( __( '', false ) ); ?>
</h1>
</div>
<div class="grid_6 grid-50 omega">
<span class="tagline">Category Archives</span>
</div>
</div>
</div>
</div> <!-- ribbon closing tag -->
<div id="wrapper3" class="container_12 grid-container">
<?php //denotes where and when sidebar goes and loads, for when it belongs on the left
if(
((is_day() || is_month() || is_year() || is_post_type_archive('post') || is_tag() || is_category() || is_author() ) && $ct_post_archive_layout == 'left')
):
get_sidebar();
?>
<div id="content" class="grid_8 grid-66 omega">
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
<?php //detmermines whether to display full page layout
elseif(
((is_day() || is_month() || is_year() || is_post_type_archive('post') || is_tag() || is_category() || is_author()) && $ct_post_archive_layout == 'full')
):
?>
<div id="content" class="grid_12 grid-100 alpha">
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
<?php
else: //default case for layout
?>
<div id="content" class="grid_8 grid-66 alpha">
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
<?php
endif;
?>
<?php
if(is_day() || is_month() || is_year() || is_post_type_archive('post') || is_tag() || is_category() || is_author()):
get_template_part('loop');
endif;
?>
</div> <!--content closing tag -->
<?php //denotes where and when sidebar goes and loads, for when it belongs on the right
if(
((is_day() || is_month() || is_year() || is_post_type_archive('post') || is_tag() || is_category() || is_author()) && ($ct_post_archive_layout == 'right' || empty($ct_post_archive_layout)))
):
get_sidebar();
endif;
?>
</div> <!--wrapper3 closing tag -->
<?php get_footer(); ?>