• I have turned off comments on posts, but some posts have embedded images. If one clicks on the image, it opens on a new theme-controlled page–and that page offers a commenting box. Last night someone(s) found it and put spam comments on every image. How do I turn this off?

    For THIS site, I’d be happy to disable the images opening larger on a new page entirely, but I can imagine somebody wanting to make commenting possible on certain images but not others.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Phil

    (@owendevelopment)

    In the ‘Post Edit’ page, click on an image within the post, edit it and you’ll see a setting under ‘link URL’.

    I always remove the default in there, so it’s left blank. Save changes, update post and voila, the image is not longer clickable.

    Phil

    Thread Starter marthalee

    (@marthalee)

    I should say I am running a child theme of Twentyten, the file attachment.php is now very very short in Twentyten, and the Twentyten file loop-attachment.php already contains the line <?php comments_template(); ?>, which fixed this before.

    It would be SOOO good to be able to control this either image by image or with a setting (say, in Settings).

    Thread Starter marthalee

    (@marthalee)

    Thanks, PSM Digital. I tried your workaround but I cannot delete the url–highlighting it and pressing “delete” acts as if I had pressed “enter”–opens the image page again! (Updated to 3.1.2, and these are mostly Pages not Posts, if that’s relevant.) It will not allow me to position the cursor at the end of url and delete character by character–its as if the cursor were not positioned there, pressing “delete” has no effect.

    Make a copy of attachment.php and loop-attachment.php in your child theme. Rename the two file image.php and loop-image.php appropriately. edit image.php so that it calls loop-image.php. Remove <?php comments_template(); ?> from loop-image.php.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘turning off comments on images?’ is closed to new replies.