WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-content/themes/twentyten/attachment.php

    r15226 r15422  
    1010get_header(); ?>
    1111
    12         <div id="container">
     12        <div id="container" class="single-attachment">
    1313            <div id="content" role="main">
    1414
    1515<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    1616
    17                 <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
    18                     /* translators: %s - title of parent post */
    19                     printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
    20                 ?></a></p>
     17                <?php if ( ! empty( $post->post_parent ) ) : ?>
     18                    <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
     19                        /* translators: %s - title of parent post */
     20                        printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
     21                    ?></a></p>
     22                <?php endif; ?>
    2123
    2224                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Note: See TracChangeset for help on using the changeset viewer.