-
Notifications
You must be signed in to change notification settings - Fork 0
/
homepage.php
64 lines (51 loc) · 1.81 KB
/
homepage.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
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* Please see /external/starkers-utilities.php for info on Starkers_Utilities::get_template_parts()
*
* @package WordPress
* @subpackage Build Institute
* @since Build Institute 1.0
*/
/*
Template Name: Homepage
*/
?>
<?php Starkers_Utilities::get_template_parts( array( 'parts/shared/html-header', 'parts/shared/header-homepage' ) ); ?>
<div id="homepage-content" class="balance-text">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
</div>
<main>
<div id="programs">
<h1>Build Programs</h1>
<?php $args = array(
'numberposts' => -1,
'offset' => 0,
'orderby' => 'menu_order',
'order' => 'DESC',
'post_type' => 'program',
'post_status' => 'publish',
'suppress_filters' => true );
$programs = get_posts( $args );
foreach ( $programs as $post ) : setup_postdata( $post ); ?>
<a href="<?php the_permalink(); ?>">
<div id="programs-tile" style="background: #<?php print_custom_field('program_color'); ?>;">
<div id="programs-tile-content" style="background: url(<?php print_custom_field('program_icon:to_image_src'); ?>) no-repeat left center; background-size: 60px 60px;">
<h2><?php the_title(); ?></h2>
</div>
</div>
</a>
<?php endforeach;
wp_reset_postdata();
?>
</div>
</main>
<?php Starkers_Utilities::get_template_parts( array( 'parts/shared/footer','parts/shared/html-footer' ) ); ?>