View difference between Paste ID: mVXE8fMp and z20gVtEL
SHOW: | | - or go back to the newest paste.
1
<?php
2
/**
3
 * The Template for displaying all Single Project posts.
4
 *
5
 * @package WordPress
6
 * @subpackage Laurel Streng
7
 * @since Laurel Streng 2.0
8
 */
9
10
get_header(); ?>
11
12-
<?php $portfolio = new WP_Query(array(
12+
<?php while ( have_posts() ) : the_post(); ?>
13-
	'post_type' => 'project'
13+
14-
)); ?>
14+
	<?php if ( is_single() ) : ?>
15-
<?php while($portfolio->have_posts()) : $portfolio->the_post(); ?>
15+
16
		<div class="row" role="main">
17-
<?php if ( is_single() ) : ?>
17+
18
		<header class="project-header large-12 columns">
19-
<div class="row" role="main">
19+
20
			<p><?php the_terms( $post->ID, 'project_type', '', '  <span class="color">|</span> ', ' ' ); ?></p>
21
		</header>
22
23-
			<p><?php the_terms($post->ID, 'project_type', '', '  <span class="color">|</span> ', ' ' ); ?></p>
23+
24
			<?php the_field( 'project_description' ); ?>
25
			<table>
26
				<tbody>
27-
			<?php the_field('project_description'); ?>
27+
28
						<td>Client:</td>
29
						<td><?php the_field( 'project_client' ); ?></td>
30
					</tr>
31
					<tr>
32-
						<td><?php the_field('project_client'); ?></td>
32+
33
						<td><?php the_field( 'project_date' ); ?></td>
34
					</tr>
35
					<tr>
36-
						<td><?php the_field('project_date'); ?></td>
36+
37
						<td>
38
							<?php
39
							$values = get_field( 'project_skills' );
40
							if ( $values ) {
41
								foreach ( $values as $value ) {
42-
							$values = get_field('project_skills');
42+
43-
							if($values) {
43+
44-
								foreach($values as $value) {
44+
45
						</td>
46
					</tr>
47
				</tbody>
48
			</table>
49
			<?php if ( get_field( 'project_url' ) ): ?>
50
				<a class="button small radius" href="<?php the_field( 'project_url' ); ?>" target="_blank">Launch Project</a>
51
			<?php endif; ?>
52-
			<?php if(get_field('project_url')): ?>
52+
53-
				<a class="button small radius" href="<?php the_field('project_url'); ?>" target="_blank">Launch Project</a>
53+
54
		<div class="large-6 columns">
55
		</div>
56
	</article>
57
</div>
58
	<?php endif; // is_single() ?>
59
60-
		<?php if ( is_search() ) : // Only display Excerpts for Search ?>
60+
61-
		<div class="entry-summary large-12 columns">
61+
62-
			<?php the_excerpt(); ?>
62+