• I’m wondering if there’s a way to turn off comments just on the image pages? I use the Gallery so when someone clicks on a thumbnail it brings them to a page where they see the medium size image. Then they click on that image to see just the full size image (not on it’s own page)

    But I’d like to turn off comments for the medium size image page. The “intermediate” page for lack of a better term.

    I want to keep comments open for the posts themselves, just not the individual image pages.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try amending your theme’s image.php or attachment.php template file. If you don’t have an image.php template file, try creating one. There’s an example in the default theme.

    Thread Starter oldford

    (@oldford)

    Thanks! My theme didn’t have that file, but stealing it from the default WP theme worked. I’ll just need to play with it a bit since it doesn’t support my theme’s widgets/sidebar.

    Thanks again!

    The critical bit is:

    <p class="attachment"><a href="<?php echo wp_get_attachment_url($post->ID); ?>"><?php echo wp_get_attachment_image( $post->ID, 'medium' ); ?></a></p>
    <div class="caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); // this is the "caption" ?></div>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can you turn off comments just for images?’ is closed to new replies.