-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-projects.php
More file actions
75 lines (66 loc) · 2.14 KB
/
single-projects.php
File metadata and controls
75 lines (66 loc) · 2.14 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
68
69
70
71
72
73
74
75
<?php
/**
* The template for displaying all single posts.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package gen+1
*/
get_header();
$image = get_field('project_image');
if( !empty($image) ): ?>
<div class="slide" style="background-image: url(<?php echo $image['url']; ?>">
<?php endif; ?>
<div id="primary" class="project-content-area">
<main id="main" class="site-main" role="main">
<?php
while ( have_posts() ) : the_post();
?>
<div class="container project-background"/>
<article class="project-border" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="project-entry-header">
<?php
if ( is_single() ) :
the_title( '<h1 class="project-entry-title">', '</h1>');
else :
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
endif;
if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php gen1_posted_on(); ?>
</div><!-- .entry-meta -->
<?php
endif; ?>
</header><!-- .entry-header -->
<div class="project-entry-content">
<?php
the_content( sprintf(
/* translators: %s: Name of current post. */
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'gen1' ), array( 'span' => array( 'class' => array() ) ) ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'gen1' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php gen1_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
?>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php if(!empty($image) ):?>
</div>
<?php endif; ?>
<?php
get_footer();