-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-clints-projects.php
72 lines (61 loc) · 2.85 KB
/
single-clints-projects.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
<?php
/***
* The template for displaying individual blog posts (full article/blog post).
*
* @package clinton-gorda-theme
* @since 1.0.0
*/
//display header
get_header();
?>
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<article <?php post_class();?> id="post-<?php the_ID();?>" >
<div class="individual-project-heading" ><?php the_title('<h1 class="entry-title">', '</h1>'); ?></div>
<div class="individual-project-flex-container">
<div class="project-field">
<?php the_field('project_details'); ?>
<div>
<?php
$link = get_field('link_one');
if( $link ):
$link_url = $link['url'];
$link_title = $link['title'];
$link_target = $link['target'] ? $link['target'] : '_self';
?>
<a class="button" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo esc_html( $link_title ); ?></a>
<?php endif; ?>
</div>
<div>
<?php
$link = get_field('link_two');
if( $link ):
$link_url = $link['url'];
$link_title = $link['title'];
$link_target = $link['target'] ? $link['target'] : '_self';
?>
<a class="button" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo esc_html( $link_title ); ?></a>
<?php endif; ?>
</div>
</div>
<div class="individual-project-image">
<?php
$image = get_field('project_image');
?>
<?php if( !empty( $image ) ): ?>
<img src="<?php echo esc_url($image['sizes']['project-single-size']); ?>" alt="<?php echo esc_attr($image['alt']); ?>" class="project-img">
<?php endif ?>
</div>
<div class="extra-image">
<?php
$image = get_field('extra_images');
?>
<?php if( !empty( $image ) ): ?>
<img src="<?php echo esc_url($image['sizes']['full-page']); ?>" alt="<?php echo esc_attr($image['alt']); ?>" class="extra-img">
<?php endif ?>
</div>
</div>
</article>
<?php endwhile; ?>
<?php endif; ?>
<?php get_footer(); ?>