]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentyten/attachment.php
Wordpress 3.0.1
[autoinstalls/wordpress.git] / wp-content / themes / twentyten / attachment.php
index 262f63ee6c0e94e7e293d956657dcd73992c6e61..f805bcdbad8918c10f1268783e4418e459eecd89 100644 (file)
@@ -9,15 +9,17 @@
 
 get_header(); ?>
 
-               <div id="container">
+               <div id="container" class="single-attachment">
                        <div id="content" role="main">
 
 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
 
-                               <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
-                                       /* translators: %s - title of parent post */
-                                       printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
-                               ?></a></p>
+                               <?php if ( ! empty( $post->post_parent ) ) : ?>
+                                       <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
+                                               /* translators: %s - title of parent post */
+                                               printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
+                                       ?></a></p>
+                               <?php endif; ?>
 
                                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                                        <h2 class="entry-title"><?php the_title(); ?></h2>