-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfront-page.php
107 lines (100 loc) · 4.1 KB
/
front-page.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
103
104
105
106
107
<?php
/*
Template Name: front-page
*/
?>
<?php get_header(); ?>
<header class="page-header">
<div class="block__content">
<h4 class="page-title">
<a href="https://streetsupport.net">Home</a> > News
</h4>
</div>
</header>
<div class="block__content">
<?php query_posts('category_name=stories&showposts=1');
while ( have_posts() ) : the_post();
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' );
endwhile;
?>
<div class="main-image-block" style="background-image: url(<?php echo $src[0]; ?> ) !important;">
<div id="latest-stories-posts" class="container-post-excerpt">
<div class="text-wrap-div">
<h3><a class="read-more" href="<?php echo esc_url( get_permalink() ) ?>" rel="bookmark">Latest Story</a></h3>
<?php get_template_part( 'template-parts/content-front-page-catexcerpt', 'page' );?>
</div>
<a class="main-image-block__more-link" href="<?php echo home_url(); ?>/category/stories">More Stories</a>
</div>
</div>
<?php query_posts('category_name=articles&showposts=1');
while ( have_posts() ) : the_post();
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' );
endwhile;
?>
<div class="main-image-block" style="background-image: url(<?php echo $src[0]; ?> ) !important;">
<div id="latest-about-homelessness-posts" class="container-post-excerpt">
<div class="text-wrap-div">
<h3><a class="read-more" href="<?php echo esc_url( get_permalink() ) ?>" rel="bookmark">Articles</a></h3>
<?php get_template_part( 'template-parts/content-front-page-catexcerpt', 'page' );
?>
</div>
<a class="main-image-block__more-link" href="<?php echo home_url(); ?>/category/articles">More Articles</a>
</div>
</div>
</div>
<div class="block">
<div class="block__content">
<div class="container">
<h1 class="h1">Latest News</h1>
<div class="front-page__news-list">
<?php query_posts('category_name=latest-news&showposts=3');
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content-front-page-news', 'page' );
endwhile;
?>
</div>
<a href="<?php echo home_url (); ?>/category/latest-news" class="btn btn--brand-e"><span class="btn__text">Read More News Stories</span></a>
</div>
</div>
</div>
<div class="block block--top-border">
<div class="block__content">
<div class="container">
<h2 class="h2">Want news from your area? Select your location from the list below:</h2>
<ul class="link-list link-list--4-col">
<?php $locationTerms = get_terms('locations', 'hide_empty=0&hierarchical=0&parent=0');
foreach ($locationTerms as $location) { ?>
<li><a class="link-list__link" href="/<?= $location->slug ?>"><?= $location->name ?></a></li>
<?php } ?>
</ul>
</div>
</div>
</div>
<div class="block block--offwhite">
<div class="block__content recent-activity js-accordion">
<div id="latest-comments" class="front-page__comments container-cat-titles offwhite-frontpage accordion__item">
<h1 class="h1 js-header footer-menu__heading">Subjects</h1>
<div class="front-page__comments-list js-item accordion__inner">
<?php get_template_part( 'template-parts/content-front-page-tags', 'page' );
?>
</div>
</div>
<div id="latest-categories" class="front-page__categories container-cat-titles offwhite-frontpage accordion__item">
<h1 class="h1 js-header footer-menu__heading">Categories</h1>
<div class="front-page__category-list js-item accordion__inner">
<?php get_template_part( 'template-parts/content-front-page-categories', 'page' );
?>
</div>
</div>
<div id="latest-archives" class="front-page__archives container-cat-titles offwhite-frontpage accordion__item">
<h1 class="h1 js-header footer-menu__heading">Archive</h1>
<div class="front-page__archive-list js-item accordion__inner">
<?php get_template_part( 'template-parts/content-front-page-archives', 'page' );
?>
</div>
</div>
</div>
</div>
<?php
get_sidebar();
get_footer();