-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-testi.php
More file actions
67 lines (62 loc) · 2.8 KB
/
page-testi.php
File metadata and controls
67 lines (62 loc) · 2.8 KB
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
<?php
/**
* Template Name: Testimonials
*/
get_header(); ?>
<div class="container_24">
<div id="content" class="grid_24">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h3 class="title"><?php the_title(); ?>
</h3>
<div id="page-content"><?php the_content(); ?>
</div>
<?php endwhile; else: ?>
<div class="no-results">
<p><strong>There has been an error.</strong></p>
<p>We apologize for any inconvenience, please <a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>">return to the home page</a> or use the search form below.</p>
<?php get_search_form(); ?> <!-- outputs the default Wordpress search form-->
</div>
<!--noResults-->
<?php endif; ?>
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('post_type=testi&showposts=8&paged='.$paged);
?>
<?php if (have_posts()) : while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<?php
$custom = get_post_custom($post->ID);
$testiname = $custom["testimonial-name"][0];
$testitype = $custom["testimonial-type"][0];
$testiaddress = $custom["testimonial-address"][0];
?>
<article id="post-<?php the_ID(); ?>" class="testimonial">
<div class="post-content">
<?php echo '<div class="testi-pic">'; the_post_thumbnail('testi-thumbnail'); echo '</div>'; ?>
<?php the_content(); ?>
<div class="name-testi"><span class="user"><?php echo $testiname; ?></span><?php if ($testitype!="") echo ', '; ?><span class="type"><?php echo $testitype; ?></span><?php if ($testiaddress!="") echo ', '; ?> <?php echo $testiaddress; ?></div> </div>
</article>
<?php endwhile; else: ?>
<div class="no-results">
<p><strong>There has been an error.</strong></p>
<p>We apologize for any inconvenience, please <a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>">return to the home page</a> or use the search form below.</p>
<?php get_search_form(); ?> <!-- outputs the default Wordpress search form-->
</div>
<!--noResults-->
<?php endif; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<nav class="oldernewer">
<div class="older">
<?php next_posts_link('« Older Entries') ?>
</div><!--.older-->
<div class="newer">
<?php previous_posts_link('Newer Entries »') ?>
</div><!--.newer-->
</nav>
<!--.oldernewer-->
<?php endif; ?>
<?php $wp_query = null; $wp_query = $temp;?>
</div>
</div>
<?php get_footer(); ?>