Need help? Check out our Support site, then


Remove "This gallery contains photos"

  1. I was hoping to find the above in this forum... Instead, I was only greeted with "If you don't want that to show up, do not use galleries"

    Not really the answer that I was looking for since I wanted my page to display as a gallery.

    So knowing that the entire source is open and editable, I went searching for the little piece of code that displays that annoying one line....

    If you want to remove it, here are the simple instructions:

    Go to Appearance => Editor
    Look for the file called 'content-gallery.php'

    Next search for, and either comment out or delete the following code:
    <br /> <p><em><?php printf( _n( 'This gallery contains <a>%2$s photo</a>.', 'This gallery contains <a>%2$s photos</a>.', $total_images, 'twentyeleven' ),<br /> 'href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',<br /> number_format_i18n( $total_images )<br /> ); ?></em></p>

    Press 'Update File' on the bottom, and your reference to the images should be gone.

    Hope that this helps.

  2. No, it doesn't help. First, you're probably confusing the gallery feature with the gallery post format: the two don't have to go together. Second, this is the wordpress.COM forum: wordpress.com users don't have PHP access.

Topic Closed

This topic has been closed to new replies.

About this Topic