示例#1
0
<?php

/* Std archive */
get_header();
harvest_title_bar(__('Archive', 'harvest'));
?>
		
		<div class="content_wrap">

			<div class="grid-container content">

<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $post_id = get_the_ID();
        $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium');
        $permalink = get_permalink();
        ?>

				<div class="grid-100">
<?php 
        if ($thumbnail) {
            ?>
<img src="<?php 
            echo $thumbnail[0];
            ?>
" class="left" /><?php 
        }
        ?>
					
<?php

/* Single event */
get_header();
if (have_posts()) {
    while (have_posts()) {
        the_post();
        harvest_title_bar(get_the_title());
        ?>

		<div class="content_wrap">

			<div class="grid-container content">
				
<?php 
        get_template_part('templates/event', 'details');
        ?>
				
			</div> <!-- .content.grid-container -->
			
		</div> <!-- .content_wrap -->
		<!-- END CONTENT -->

<?php 
    }
}
get_footer();
<?php

/* People archive */
get_header();
$title = array_shift(explode('/', harvest_option('ctc-people', __('People', 'harvest'))));
harvest_title_bar($title);
?>
		
		<div class="content_wrap">

			<div class="grid-container content">

<?php 
query_posts($query_string . '&orderby=menu_order&order=ASC&posts_per_page=-1');
if (have_posts()) {
    while (have_posts()) {
        the_post();
        get_template_part('templates/person', 'grid');
    }
}
?>

			</div> <!-- .content.grid-container -->

		</div> <!-- .content_wrap -->
		<!-- END CONTENT -->

<?php 
get_footer();
<?php

/* Sermon topic/location archive */
global $paged;
if (empty($paged)) {
    $paged = 1;
}
get_header();
$term = get_queried_object();
$title = explode('/', harvest_option('ctc-sermon-topic', __('Topic', 'harvest')));
$title = array_pop($title);
harvest_title_bar(sprintf('%s: %s', $title, $term->name));
?>
		
		<div class="content_wrap">

			<div class="grid-container content">

<?php 
harvest_get_tax_dropdown('ctc_sermon_topic');
?>

<?php 
$i = 1;
if (have_posts()) {
    while (have_posts()) {
        the_post();
        if ($paged == 1 && $i == 1) {
            // The first one is displayed with full details
            ?>
			<div class="grid-100" style="padding-bottom: 20px; text-decoration: underline"><h1><?php 
<?php

/* Event tag archive */
get_header();
$term = get_queried_object();
harvest_title_bar(sprintf(_x('%s events', 'Event category', 'harvest'), $term->name));
?>
		<div class="content_wrap">

			<div class="grid-container content">
			
<?php 
harvest_get_tax_dropdown('ctc_event_category');
?>
				
<?php 
do_action('__before_loop');
if (!have_posts()) {
    ?>
			<div class="grid-100 ctc-event-category-desc" >
				<p><?php 
    _e('No events were found in that category. Check back at a later time for newer events. Thanks!', 'harvest');
    ?>
</p>
			</div>
	
<?php 
} else {
    if ($term->description) {
        ?>
				<div class="grid-100 ctc-event-category-desc" >
示例#6
0
<?php

/* Single page */
get_header();
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $post_id = get_the_ID();
        $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
        $color = get_post_meta($post_id, '_post_accent_color', true);
        harvest_title_bar(get_the_title(), $color);
        ?>

		<div class="content_wrap">

			<div class="grid-container content">
		
<?php 
        if ($thumbnail) {
            ?>
				<div class="grid-100 featured-image-div">
					<img src="<?php 
            echo $thumbnail[0];
            ?>
" class="featured-image"/>
				</div>
<?php 
        }
        ?>
	
				<div class="grid-100 ctc-content">
示例#7
0
<?php

get_header();
harvest_title_bar(__('Page Not Found', 'harvest'));
?>
		
		<div class="content_wrap">

			<div class="grid-container content">
				<div class="grid-100 ctc-content error-404">
				
				<?php 
_e('We\'re sorry. The page you requested could not be found. It\'s a simple mistake, probably on our part. Please <a href="/">click here</a> to return our homepage or use the menu above to visit another section of our site. Have a great day!', 'harvest');
?>
				
				</div>
			</div> <!-- .content.grid-container -->
		</div> <!-- .content_wrap -->
		<!-- END CONTENT -->

<?php 
get_footer();