Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 90 lines (58 sloc) 3.244 kb
2aa8890 Importing the initial My Life theme files and folders.
greenshady authored
1 <?php
2 /**
3 * Attachment Template
4 *
5 * This is the default attachment template. It is used when visiting the singular view of a post attachment
6 * page (images, videos, audio, etc.).
7 *
8 * @package MyLife
9 * @subpackage Template
10 * @since 0.1.0
11 * @author Justin Tadlock <justin@justintadlock.com>
877f5cf @justintadlock Update copyright and theme info.
authored
12 * @copyright Copyright (c) 2011 - 2012, Justin Tadlock
2aa8890 Importing the initial My Life theme files and folders.
greenshady authored
13 * @link http://themehybrid.com/themes/my-life
14 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
15 */
16
17 get_header(); // Loads the header.php template. ?>
18
19 <?php do_atomic( 'before_content' ); // my-life_before_content ?>
20
21 <div id="content">
22
23 <?php do_atomic( 'open_content' ); // my-life_open_content ?>
24
25 <div class="hfeed">
26
27 <?php if ( have_posts() ) : ?>
28
29 <?php while ( have_posts() ) : the_post(); ?>
30
31 <?php do_atomic( 'before_entry' ); // my-life_before_entry ?>
32
33 <div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
34
35 <?php do_atomic( 'open_entry' ); // my-life_open_entry ?>
36
37 <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
38
39 <?php echo apply_atomic_shortcode( 'byline', '<div class="byline">' . sprintf( __( 'Sizes: %s', 'my-life' ), my_life_get_image_size_links() ) . '</div>' ); ?>
40
41 <div class="entry-content">
42
43 <?php if ( has_excerpt() ) {
44 $src = wp_get_attachment_image_src( get_the_ID(), 'full' );
45 echo do_shortcode( '[caption align="aligncenter" width="' . esc_attr( $src[1] ) . '" caption="' . get_the_excerpt() . '"]' . wp_get_attachment_image( get_the_ID(), 'full', false ) . '[/caption]' );
46 } else {
47 echo wp_get_attachment_image( get_the_ID(), 'full', false, array( 'class' => 'aligncenter' ) );
48 } ?>
49
50 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'my-life' ) ); ?>
51 <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'my-life' ), 'after' => '</p>' ) ); ?>
52
53 <?php $gallery = do_shortcode( sprintf( '[gallery id="%1$s" exclude="%2$s" columns="8" numberposts="16" orderby="rand"]', $post->post_parent, get_the_ID() ) ); ?>
54
55 <?php if ( !empty( $gallery ) ) { ?>
56 <div class="image-gallery">
57 <h3><?php _e( 'Gallery', 'my-life' ); ?></h3>
58 <?php echo $gallery; ?>
59 </div>
60 <?php } ?>
61
62 </div><!-- .entry-content -->
63
64 <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( 'Published on [entry-published] [entry-edit-link before="| "]', 'my-life' ) . '</div>' ); ?>
65
66 <?php do_atomic( 'close_entry' ); // my-life_close_entry ?>
67
68 </div><!-- .hentry -->
69
70 <?php do_atomic( 'after_entry' ); // my-life_after_entry ?>
71
72 <?php do_atomic( 'after_singular' ); // my-life_after_singular ?>
73
74 <?php comments_template( '/comments.php', true ); // Loads the comments.php template. ?>
75
76 <?php endwhile; ?>
77
78 <?php endif; ?>
79
80 </div><!-- .hfeed -->
81
82 <?php do_atomic( 'close_content' ); // my-life_close_content ?>
83
84 <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
85
86 </div><!-- #content -->
87
88 <?php do_atomic( 'after_content' ); // my-life_after_content ?>
89
90 <?php get_footer(); // Loads the footer.php template. ?>
Something went wrong with that request. Please try again.