-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplate-home.php
50 lines (49 loc) · 1.55 KB
/
template-home.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
<?php
/*
Template Name: Home Page
*/
?>
<?php get_header(); ?>
<section class="home-content">
<div class="grid_8 hfeed">
<?php
$args=array(
'post_type' => 'post',
'order' => 'DESC',
'post_status' => 'publish',
'posts_per_page' => 8,
);
query_posts( $args );
?>
<?php if(have_posts() ):?>
<h2>Latest Blog Posts</h2>
<ul class="listing">
<?php while ( have_posts() ) : the_post(); ?>
<li>
<?php if (has_post_thumbnail()) : ?>
<div class="img"> <a href="<?php the_permalink();?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail('post-thumnbail', array('title' => ''.get_the_title().'')); ?>
</a> </div>
<?php endif; ?>
<div class="text<?php if(!has_post_thumbnail()) echo ' no-image';?>">
<h3><a href="<?php the_permalink();?>"><?php the_title();?></a></h3>
<p class="meta"><span><i class="icon-calendar"></i> <?php the_time('M d, Y'); ?></span> <span><i class="icon-user"></i> <?php the_author_posts_link(); ?></span></p>
<?php echo excerpt(25); ?>
</div>
</li>
<?php endwhile;wp_reset_query(); ?>
</ul>
<p class="more"><a href="/blog"><i class="icon-arrow-right"></i> View All Blog Posts</a></p>
<?php endif; ?>
</div>
<aside class="grid_4 sidebar">
<?php if ( is_active_sidebar( 'generic' ) ) :
dynamic_sidebar('generic');
endif; ?>
<?php
//Tweets
if(ot_get_option('cnkt_twitter_widget')) echo '<div class="tweets widget">'.ot_get_option('cnkt_twitter_widget').'</div>';
?>
</aside>
</section>
<?php get_footer(); ?>