forked from samikeijonen/checathlon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.php
66 lines (50 loc) · 1.77 KB
/
image.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
<?php
/**
* The template for displaying images.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Checathlon
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-inner-singular">
<header class="entry-header page-header text-center">
<?php the_title( '<h1 class="entry-title title-font no-margin-bottom text-italic">', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-media">
<?php
if ( has_excerpt() ) :
$src = wp_get_attachment_image_src( get_the_ID(), 'full' );
echo img_caption_shortcode( array( 'align' => 'aligncenter', 'width' => esc_attr( $src[1] ), 'caption' => get_the_excerpt() ), wp_get_attachment_image( get_the_ID(), 'full', false ) );
else :
echo wp_get_attachment_image( get_the_ID(), 'full', false, array( 'class' => 'aligncenter' ) );
endif;
?>
</div><!-- .entry-media -->
<div class="entry-inner-singular-wrapper">
<div class="entry-inner-content">
<div class="entry-content">
<?php
the_content();
?>
</div><!-- .entry-content -->
</div><!-- .entry-inner-content -->
</div><!-- .entry-inner-singular-wrapper -->
</div><!-- .entry-inner-singular -->
</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;
?>
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();