Support » Networking WordPress » Getting Pingback spam on the front pages of my network sites

  • Hello, since 5 days I am getting spam pings for the front pages of my subdomain network sites. Which is strange because I thought pings were only for posts!

    My network sites have no posts and only a few pages. Comments on the pages, especially on the front pages, are disabled. At discussion settings, “Allow link notifications from other blogs (pingbacks and trackbacks) on new posts” is enabled but, as I said, the sites do not have any posts, and also afaik this setting ONLY affects the default for new posts.

    So, maybe it is a bug that allows these pingbacks to come in on the front page even when comments are disabled, maybe even a security related bug? They are not shown publicly, but I see them in the comments section in the back end.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Pages are still “posts” in the WP schema. They are a different post type, but their data is still saved in the wp_posts table and are represented as WP_Post objects. When post types are registered, the developer can indicate whether the post type should support comments are not. In the case of both “page” and “post” post types, comments are supported by default. “It’s not a bug, it’s a feature” (sorry, couldn’t resist) As these are built-in post types, it’s not practical to fully remove basic comment support as registered. Instead we should use comment processing techniques to suppress the ability to post and view comments.

    Pingbacks are a special kind of comments that bypass many of the controls imposed on human commenters so they are more difficult to control. There are filters and actions available to suppress pingback comments if you have the skills to develop custom code. There might be plugins available that do this for you, but the simplest way to suppress pingbacks is to turn off the feature in settings.

    Of course this setting affects regular blog posts as well. If you desire to maintain pingbacks for posts but not pages, you need either custom code or a plugin.

    Thread Starter w-sky

    (@w-sky)

    Okay, thanks for explaining! Just how would I deactivate pings for the front pages of my sites?

    Comments are already disabled on those pages. And pages do not have the option “Allow pingbacks & trackbacks” which posts have in the “Comments” section in the right sidebar (post or page settings) of WP visual editor.

    Pages only have “Allow comments” which can be checked or unchecked, and it is unchecked.

    Moderator bcworkz

    (@bcworkz)

    If the usual comment settings don’t accomplish what you want you can assert finer control through various filter hooks. For example, “pre_comment_approved” filter can be used to check if the comment_type is “pingback” and if the comment_post_ID is that of your front page. You can check or not check any comment properties you like there. If the comment is entirely undesirable, you could return a new WP_Error object which will cause the comment to be silently discarded. It will then even bypass the trashed comments folder. See the above linked doc page for other possible return values.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.