forked from AgriLife/AgriFlex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-home.php
executable file
·76 lines (61 loc) · 2.16 KB
/
page-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
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
<?php
/**
* Template Name: Home: Default
*
* @package AgriFlex
* @since AgriFlex 1.0
*/
?>
<?php get_header(); ?>
<div id="wrap">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_front_page() ) : ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php else : ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php endif; ?>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages(
array( 'before' => '<div class="page-link">' . __( 'Pages:',
'county_ext' ), 'after' => '</div>' ) ); ?>
<?php agriflex_edit_link(); ?>
</div><!-- .entry-content -->
</div><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; ?>
<div id="home-middle">
<div class="home-middle-features">
<?php $my_query = new WP_Query('meta_key=feature-homepage&meta_value=1&showposts=3&post_type=any');
$count = 0;
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate[] = $post->ID; $count++;
global $post;
?>
<div class="featured-wrap" id="featured-wrapper-<?php echo $count;?>">
<h3 class="entry-title">
<a href="<?php the_permalink();?>">
<?php echo get_the_title(); ?>
</a>
</h3>
<p>
<?php agriflex_post_thumbnail(); ?>
</p>
<?php the_excerpt();?>
</div><!-- end .featured-wrap -->
<?php endwhile; wp_reset_query; ?>
</div><!-- end .home-features -->
<div class="home-middle-1">
<?php if (!dynamic_sidebar('Home Page Bottom')) : ?>
<div class="widget">
<h2><?php _e("", 'agriflex'); ?></h2>
<p><?php _e("", 'agriflex'); ?></p>
</div>
<?php endif; ?>
</div><!-- end .home-middle-1 -->
</div><!-- end #home-middle -->
</div><!-- #content -->
</div><!-- #wrap -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>