-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-front-page.php
165 lines (96 loc) · 5.16 KB
/
page-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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
/**
* Front Page Singular Template
*
* This is the front page singular template. It is used for creating custom home pages.
* singular views of posts (any post type).
*
* Template Name: Front Page
* @package happystrap
* @subpackage Template
*/
get_header(); ?>
<?php do_atomic( 'open_content' ); // Open content hook ?>
<!-- Example row of columns -->
<section id="ways-to-loop">
<h2 class="page-header">Ways to loop in WordPress</h2>
<div class="row">
<?php
$args = array (
'post_type' => 'page', // need to say page to make post__in work
'post__in' => array (34,68), // page IDs
'order' => 'ASC' // bc i put them in backward
);
$query_ways = new WP_Query($args);
while ( $query_ways->have_posts() ) : $query_ways->the_post(); ?>
<div <?php post_class('span6'); ?> id="post-<?php the_ID(); ?>">
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
<?php the_excerpt(); ?>
<p><a class="btn" href="<?php the_permalink(); ?>">Read More »</a></p>
</div>
<?php endwhile; ?>
<?php wp_reset_postdata(); // reset the query ?>
</div><!-- .row -->
</section>
<!-- Row of columns -->
<section id="loops">
<h2 class="page-header">Loop Examples</h2>
<div class="row">
<?php
$args = array (
'post_type' => 'happy_loop', // need to say page to make post__in work
'posts_per_page' => 6
);
$query_ways = new WP_Query($args);
while ( $query_ways->have_posts() ) : $query_ways->the_post(); ?>
<div <?php post_class('span4'); ?> id="post-<?php the_ID(); ?>">
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
<?php the_excerpt(); ?>
<p><a class="btn" href="<?php the_permalink(); ?>">View Loop »</a></p>
</div>
<?php endwhile; ?>
<?php wp_reset_postdata(); // reset the query ?>
</div><!-- .row -->
<p><a class="btn btn-info btn-large" href="/wordpress-loop">View Loop Archives »</a></p>
</section><!-- #loops -->
<!-- Example row of columns -->
<section id="posts">
<h2 class="page-header">Recent Blog Posts</h2>
<div class="row">
<?php
$args = array (
'post_type' => 'post', // need to say page to make post__in work
'posts_per_page' => 2
);
$query_ways = new WP_Query($args);
while ( $query_ways->have_posts() ) : $query_ways->the_post(); ?>
<div <?php post_class('span6'); ?> id="post-<?php the_ID(); ?>">
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
<?php the_excerpt(); ?>
<p><a class="btn" href="<?php the_permalink(); ?>">Read Full Post »</a></p>
</div><!-- post -->
<?php endwhile; ?>
<?php wp_reset_postdata(); // reset the query ?>
</div><!-- .row -->
<p><a class="btn btn-info btn-large" href="/blog">View Blog Archives »</a></p>
</section><!-- #posts -->
<div id="submit-a-loop" class="hero-unit">
<h2>Submit a loop.</h2>
<p>Did you make a WordPress loop happy? Submit it here! Share with the community so we can learn together. Fill out the form below, and it will be reviewed to make sure it's halfway decent. But don't worry, code can <em>always</em> be improved on - so if you have something cool let's all check it out : ).</p>
<p><a class="btn btn-large btn-info" href="/submit-a-loop" >Submit a loop »</a></p>
</div>
<div id="about" class="hero-unit">
<h2>Who's behind all this?</h2>
<p>My name is <a href="http://krogsgard.com">Brian Krogsgard</a>. I'm just like any other WordPress developer. I got involved, and slowly learned after following a number of blogs, reading my eyes out, and just hacking away. Hopefully Happy Loops will help you learn one of the most important aspects of WordPress a bit faster so you can go make your clients happy.</p>
<p>You may also know me as a contributing editor for <a href="http://wpcandy.com">WPCandy</a>. You can consider Happy Loops to be under the broad umbrella of WPCandy. Ryan and I would like to eventually see a number of these focused informational sites to help people learn about specific aspects of WordPress.</p>
<p><a class="btn btn-large btn-info" href="/about">Learn more »</a></p>
</div>
<div id="contact" class="hero-unit">
<h2>Get in touch.</h2>
<p>I'm pretty easy to get hold of. You can find me at my personal <a href="http://krogsgard.com">website</a>, on Twitter <a href="http://twitter.com/krogsgard">@krogsgard</a> or just fill out the form below.</p>
<p>You can also follow <a href="http://twitter.com/happyloops">@HappyLoops</a> on Twitter to get updates for this site.</p>
<?php gravity_form(3, false, false, false, '', true); ?>
</div>
<?php do_atomic( 'close_content' ); // Close content hook ?>
<?php get_template_part( 'loop-nav' ); ?>
<?php get_footer(); ?>