Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

attachment-image.php template added.

  • Loading branch information...
commit 7dfbe819155c36d4d9a202c7ac694722d5bfd1d4 1 parent 6a0ff40
Sami Keijonen authored
Showing with 93 additions and 2 deletions.
  1. +88 −0 attachment-image.php
  2. +1 −1  footer.php
  3. +1 −1  functions.php
  4. +3 −0  style.css
View
88 attachment-image.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Attachment Template
+ *
+ * This is the default image attachment template.
+ *
+ * @package Path
+ * @subpackage Template
+ * @since 0.1.0
+ */
+
+get_header(); // Loads the header.php template. ?>
+
+ <?php do_atomic( 'before_content' ); // path_before_content ?>
+
+ <div id="content">
+
+ <?php do_atomic( 'open_content' ); // path_open_content ?>
+
+ <div class="hfeed">
+
+ <?php get_template_part( 'loop-meta' ); // Loads the loop-meta.php template. ?>
+
+ <?php if ( have_posts() ) : ?>
+
+ <?php while ( have_posts() ) : the_post(); ?>
+
+ <?php do_atomic( 'before_entry' ); // path_before_entry ?>
+
+ <article id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
+
+ <?php do_atomic( 'open_entry' ); // path_open_entry ?>
+
+ <header class="entry-header">
+ <?php echo apply_atomic_shortcode( 'entry_title', '[entry-title]' ); ?>
+ </header><!-- .entry-header -->
+
+ <div class="entry-content">
+
+ <?php echo wp_get_attachment_image( get_the_ID(), 'full', false, array( 'class' => 'aligncenter' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'path' ), 'after' => '</p>' ) ); ?>
+
+ <?php $gallery = do_shortcode( sprintf( '[gallery id="%1$s" exclude="%2$s" columns="8"]', $post->post_parent, get_the_ID() ) ); ?>
+
+ <?php if ( !empty( $gallery ) ) { ?>
+ <div class="image-gallery">
+ <h3><?php _e( 'Gallery', 'path' ); ?></h3>
+ <?php echo $gallery; ?>
+ </div>
+ <?php } ?>
+
+ </div><!-- .entry-content -->
+
+ <footer class="entry-footer">
+ <?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( 'Published on [entry-published] [entry-edit-link before="| "]', 'path' ) . '</div>' ); ?>
+ </footer><!-- .entry-footer -->
+
+ <?php do_atomic( 'close_entry' ); // path_close_entry ?>
+
+ </article><!-- .hentry -->
+
+ <?php do_atomic( 'after_entry' ); // path_after_entry ?>
+
+ <?php get_sidebar( 'after-singular' ); // Loads the sidebar-after-singular.php template. ?>
+
+ <?php do_atomic( 'after_singular' ); // path_after_singular ?>
+
+ <?php comments_template( '/comments.php', true ); // Loads the comments.php template. ?>
+
+ <?php endwhile; ?>
+
+ <?php else : ?>
+
+ <?php get_template_part( 'loop-error' ); // Loads the loop-error.php template. ?>
+
+ <?php endif; ?>
+
+ </div><!-- .hfeed -->
+
+ <?php do_atomic( 'close_content' ); // path_close_content ?>
+
+ <?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
+
+ </div><!-- #content -->
+
+ <?php do_atomic( 'after_content' ); // path_after_content ?>
+
+<?php get_footer(); // Loads the footer.php template. ?>
View
2  footer.php
@@ -42,7 +42,7 @@
<?php hybrid_footer_content(); ?>
</div>
- <?php do_atomic( 'footer' ); // picturesque_footer ?>
+ <?php do_atomic( 'footer' ); // path_footer ?>
</div><!-- .wrap -->
View
2  functions.php
@@ -341,7 +341,7 @@ function path_comment_note() { ?>
*/
function path_excerpt_more() {
- return '...<p><a class="more-link" href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '"> ' . __( 'Read more &rarr;', 'path' ) . ' </a></p>';
+ return '...<span class="path-read-more"><a class="more-link" href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '"> ' . __( 'Read more &rarr;', 'path' ) . ' </a></span>';
}
View
3  style.css
@@ -556,6 +556,9 @@ h3.menu-secondary-mobile-title {
.archive .format-link .entry-title {
margin-bottom: 1em;
}
+.singular-attachment .entry-title {
+ text-align: center;
+}
/* Bylines. */
.byline {
Please sign in to comment.
Something went wrong with that request. Please try again.