Support » Fixing WordPress » WordPress Is Giving Each of My Media Items It’s Own Post and It’s Being Spammed

  • Resolved jakesummers

    (@jakesummers)


    Hello,

    As it says in the title, WordPress is putting every picture I upload into the media library, into it’s own post. It’s really odd. The more troubling thing is that I am getting thousands of spam comments on some of these pictures.The spam has gotten so bad that Hostgator sent me a warning about my bandwidth usage, it’s like 10s and 100s of gigabytes a day.

    I thought that it was my “Enhanced Media Library” plugin that was the problem, but I deactivated it, uploaded a test photo, and it is still doing it.

    Here’s an example of what I mean, this is an actual page from my site

    be

    That was the test image that I put in. The title of the photo is “be.jpg”.
    In my media library, it says the photo is stored at:
    http://catnipcollege.com/wp-content/uploads/2016/09/be.jpg

    It is stored there, but it is also being given it’s own individual post. It should only be stored at the second link.

    What is even weirder still, is that these posts that it is generating are titled with the name of the image. And, the comments section for it is not using WPDiscuz, but all of my regular posts, such as the ones in “comics”, are using WpDiscuz.

    I would appreciate even any rational starting point on how to troubleshoot this issue.

    Thank you very much,
    Jake

    • This topic was modified 3 years, 5 months ago by jakesummers.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi, Jake (@jakesummers).

    As it says in the title, WordPress is putting every picture I upload into the media library, into it’s own post. It’s really odd.

    Not so odd, really. πŸ™‚

    Media Library items are Posts in their own right and so they each have their own individual page (which is called the attachment page, and its display falls within the Template Hierarchy).

    The more troubling thing is that I am getting thousands of spam comments on some of these pictures.

    You can disable comments on individual Media Library items on their respective Edit screens, by unchecking “Allow comments” in the Discussion box (which you may need to enable in Screen Options if you don’t already see it).

    Or, if you have a lot of media items, you could try a plugin like Disable Comments (which would let you turn them off all at once for the media post type).

    Thanks for your feedback πŸ™‚

    I kind of panicked after I got the notification from Hostgator and didn’t really do too much research about this before posting.

    I just learned about the attachment pages you mentioned.

    To resolve the issue, I created an attachment.php template and copied my single.php and pasted it into attachment.php, and grabbed the attachment image with wp_get_attachment_image() and wrapped it in a link using wp_get_attachment_url().

    I’m not sure if this solution will work if I ever import video or music, since only wp_get_attachment_image() is used, but for now it’s fine.

    I also went through my media library and attached all of the unnattached pictures, such as featured images, to posts so that they are in the “attachments” subfolder of that post rather than having their permalink located in a subfolder directly below the homepage.

    Thanks again for your input girlieworks πŸ™‚

    • This reply was modified 3 years, 5 months ago by jakesummers.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress Is Giving Each of My Media Items It’s Own Post and It’s Being Spammed’ is closed to new replies.