-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
executable file
·52 lines (52 loc) · 2.64 KB
/
index.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
<?php get_header(); ?>
<div id="primary" class="<?php if ($hemingwayEx_options['homepage_layout'] == 0) echo 'two'; else echo 'one'; ?>col-stories" >
<div class="inside">
<?php
if ($hemingwayEx_options['homepage_layout'] == 0) {
// Here is the call to only make two posts show up on the homepage REGARDLESS of your options in the control panel
//query_posts('showposts=2');
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('showposts=2'.'&paged='.$paged);
}
?>
<?php if ($wp_query->have_posts()) : ?>
<?php $first = true; ?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="story<?php if($first == true) echo " first" ?>">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s','hemingwayex'),the_title()); ?>"><?php the_title(); ?></a></h3>
<?php if ($hemingwayEx_options['excerpt_enabled'] == 1) { ?>
<?php $hemingwayEx->excerpt() ?><span class="read-on"><a href="<?php the_permalink() ?>"><?php _e('read on','hemingwayex') ?></a></span>
<?php } else {
the_content('<span class="read-on">'. __('read on','hemingwayex') .'</span>');
} ?>
<div class="details">
<?php _e('Posted at','hemingwayex') ?> <?php the_time('ga \o\n ' . $hemingwayEx->date_format(true) . '/y') ?> | <?php comments_popup_link(__('No Comments »', 'hemingwayex'), __('1 Comment »', 'hemingwayex'), __ngettext('% comment', '% comments', get_comments_number (), 'hemingwayex')); ?> | <?php _e('Filed Under: ','hemingwayex'); the_category(', ') ?>
<?php if ($hemingwayEx_options['excerpt_enabled'] == 0) { ?>
<br /><?php _e('Tags','hemingwayex') ?>: <?php the_tags('', ', '); ?>
<?php } ?>
</div>
</div>
<?php $first = false; ?>
<?php endwhile; ?>
<?php if ($hemingwayEx_options['paging_enabled'] == 1) : ?>
<div class="clear"></div>
<div id="paging">
<?php previous_posts_link(' « ');
echo ' ';
next_posts_link(' Next » ');
?>
</div>
<?php endif; $wp_query = null; $wp_query = $temp; ?>
</div>
<?php else : ?>
<h2 class="center"><?php _e('Not Found','hemingwayex')?></h2>
<p class="center"><?php _e("Sorry, but you are looking for something that isn't here.",'hemingwayex') ?></p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
<div class="clear"></div>
</div>
<!-- [END] #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>