WordPress.org

Ready to get started?Download WordPress

Forums

PhotoSmash Galleries
Removing commenting from pictures? (2 posts)

  1. amydiane21
    Member
    Posted 3 years ago #

    If someone clicks on a picture from the gallery it goes to its own page with just that picture. How do you remove the option to leave comments on that page or remove the option to click on the picture? On the main page with the gallery, I have removed the commenting, but it allows it when the picture is clicked on!

    Please help! I can't figure it out at all!
    Thanks, Amy

    http://wordpress.org/extend/plugins/photosmash-galleries/

  2. Byron
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Amy,

    It sounds like you've got the images set for the thumbnails to open to the Attachment page. You could set them to open to the full sized Image instead and then have that pop up in Lightbox or Shadowbox or Thickbox, etc.

    If you wanted it to continue to open in the Attachment page, but not have comments on the attachment page, you would probably have to edit your Theme's attachment.php file.

    Look for something like:

    <?php comments_template('', true); ?>

    and put a '\\' before 'comments_template'.

    If your theme doesn't have an attachment.php file, then it would use the single.php file to display the attachments. In that case, you would need to change that line to something like:

    <?php
    if( !is_attachment() ){
    comments_template('', true);
    }
    ?>

    Be sure to make back up copies of your files before changing them. It's quite easy to mess things up, so it's always good to have a clean point you can get back to where you know everything works.

    Cheers,
    Byron

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic