Support » Fixing WordPress » Comments go to an image file page

  • Resolved tommyshanks

    (@tommyshanks)


    I can’t link to the page as you’d have to be logged into the site.

    If you go to a post and you want to make comment on that post, you log in and make comment, it has to await approval. When I look at it as the Admin, I see the comment but it’s at an image file page https://docterr.com/wp-admin/post.php?post=14&action=edit it’s called cropped-docterr6-1.jpg.

    How do I get the comment to go to the post that the visitor is wanting to comment on? I’ve checkout all my setting and this ‘page’ ain’t mentioned. Crazy.

    The ‘page’ isn’t in my list of pages. I am Baffled.

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Looks like you have comments open on attachment pages.

    To disable it for an individual media file (image) please follow next steps:

    1. Select Media > Library from the dashboard.
    2. Click the media item you want to edit.
    3. Select Edit more details in the right panel.
    4. Under the Discussion section, uncheck the box next to Allow comments. This region might be hidden. If so, display it by selecting Discussion in Screen Options on top right of the screen.
    5. Uncheck Allow Comments and click Update.

    To disable those comments programatically for all attachment pages, you can add the following snippet to your themes functions.php

    function wdc_filter_media_comment_status( $open, $post_id ) {
        $post = get_post( $post_id );
        if( $post->post_type == 'attachment' ) {
            return false;
        }
        return $open;
    }
    add_filter( 'comments_open', 'wdc_filter_media_comment_status', 10 , 2 );
    Thread Starter tommyshanks

    (@tommyshanks)

    Stefan, you are my Hero. I should have tried asking the question instead of spending the last three days of my spare time fiddling about for an answer.

    Thank-you most sincerely. Thank-you. Works like a Dream,

    Thread Starter tommyshanks

    (@tommyshanks)

    .

    @tommyshanks I’m glad it helped! You’re welcome 🙂

    Thread Starter tommyshanks

    (@tommyshanks)

    I’m hoping you’re still there Stefan.

    Problem not sorted. It worked for me using a fake user on my pc, got my daughter to try, seperate IP, stays in another town with her mum, just went to othe image page. I deleted the page and asked her to send another comment, I didn’t get it in the dashboard.

    Need to say however, couldn’t properly follow your steps. 3. Select Edit more details in the right panel.- all I got was various options, tried clicking Discussion but it just went blue, uncheck and the only one that was blue which was, if I remember correctly, share. I unchecked that.

    So in short, didn’t/couldn’t follow your advise. Thought problem sorted when my fake user from my end was able to post but if someone outside my flat tries and posts a comment it now goes nowhere.

    Need help man!

    @tommyshanks I’m still here 🙂

    So to try to understand you want the comment from attachment page aka image page to go to the parent post page, or you want to disable comments on the attachment pages?

    By default, if the option Allow people to submit comments on new posts in Settings -> Discussion is checked it will automatically open comments on all entries on your website(pages, posts, media), and you have an option to manually override it.

    Let me grab a few screenshots regarding the steps above

    @tommyshanks please take a look at video instruction.

    Video of the instructions shared above

    Thread Starter tommyshanks

    (@tommyshanks)

    Yeh the Allow people to submit comments on new posts is checked.

    Like I say Stefan, I’ve removed any relevant image pages that the comment to post was going to and nothing. My daughter made a comment on an identified post and it didn’t come up on the dashboard, I’m assuming because I’ve deleted the/they image pages.

    I never get things easy. Any ideas?

    Thread Starter tommyshanks

    (@tommyshanks)

    If of any relevance, I’m using Twenty-twnty-one.

    The plug-ins I’m using are –
    Akismet Anti-Spam
    Jetpack
    Login or Logout Menu Item
    Options for Twenty Twenty-One
    PayPal Donation
    Stop WP Emails Going to Spam
    UpdraftPlus – Backup/Restore
    User Registration
    VaultPress
    WPtouch Mobile Plugin

    So in WordPress attachment page (image page) is the separate content type from Pages, Posts. Each content type can have comments enabled or disabled.

    I think that in your case someone commented on the attachment page instead of page and that caused the issue.

    Because each content type entry has it’s own ID they are considered as different instances so the comments belong only to them.

    The comment not appearing in dashboard may be caused by cache, for example you removed the page but it was cached on your daughters browser so she was able to see it and comment on it.

    Can you try in a private/incognito window?

    Thread Starter tommyshanks

    (@tommyshanks)

    It works for me at the pc using another user-name. It doesn’t work for my daughter at a different area. I’ve not been able to gain contact with my daughter, it’s a Friday and she’s in her twenties, and when I was that age I wasn’t interested in communicating with my parents either.

    Shall make comment tomorrow. I deeply thank-you for your help man.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Comments go to an image file page’ is closed to new replies.