-
Notifications
You must be signed in to change notification settings - Fork 0
/
category-climate-dispatch.php
102 lines (73 loc) · 3.23 KB
/
category-climate-dispatch.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
/**
* Displays archive pages if a speicifc template is not set.
*
* For more info: https://developer.wordpress.org/themes/basics/template-hierarchy/
*/
get_header(); ?>
<?php $hero = get_field('blog_header');
if ( $hero ): ?>
<header class="header" role="banner" style="background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/swoosh.png'), url('<?php echo $hero ?>')">
<?php
else: ?>
<header class="header" role="banner" style="background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/swoosh.png'), url('<?php echo get_template_directory_uri(); ?>/assets/images/default-header.jpg')">
<?php
endif; ?>
<div class="navWrap">
<div class="grid-container">
<?php get_template_part( 'parts/nav', 'offcanvas-topbar' ); ?>
</div>
</div>
<div id="heroTitle">
<?php
//if(!empty($category)){$firstCategory = $category[0]->cat_name;} ?>
<h1>Climate Dispatch</h1>
</div>
</header> <!-- started in header.php-->
<div class="content">
<div class="grid-container">
<div class="inner-content grid-x grid-margin-x grid-padding-x">
<main class="main small-12 medium-8 large-8 cell" role="main">
<header>
<?php the_breadcrumb(); ?>
<h1 class="page-title"><?php the_archive_title();?></h1>
<?php the_archive_description('<div class="taxonomy-description">', '</div>');?>
</header>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
/**
* Template part for displaying posts
*
* Used for single, index, archive, search.
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(''); ?> role="article">
<div class="grid-x grid-padding-x">
<div class="cell small-12 medium-6 large-6">
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail('news'); ?></a>
</div>
<div class="cell small-12 medium-6 large-6">
<header class="article-header">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php //get_template_part( 'parts/content', 'byline' ); ?>
</header> <!-- end article header -->
<section class="entry-content" itemprop="text">
<?php echo excerpt(15);?>
</section> <!-- end article section -->
<footer class="article-footer">
<a class="excerpt-read-more" href="<?php the_permalink(); ?>">Read more <span class="greenarrow"></span></a>
</footer> <!-- end article footer -->
</div>
</div>
</article> <!-- end article -->
<?php endwhile; ?>
<?php joints_page_navi(); ?>
<?php else : ?>
<?php get_template_part( 'parts/content', 'missing' ); ?>
<?php endif; ?>
</main> <!-- end #main -->
<?php get_sidebar(); ?>
</div> <!-- end #inner-content -->
</div> <!-- end .grid-container -->
</div> <!-- end #content -->
<?php get_footer(); ?>