WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do I stop links to other posts in same weblog producing a pingback? (24 posts)

  1. gregh
    Member
    Posted 9 years ago #

    I'm running WordPress 1.5.1.3 and whenever I put a link from one post in my weblog to another post in the same weblog I get a pingback! This is most definitely not what I want to happen.

    Is this a bug or am I doing something wrong? Please don't tell me that the fix is to turn off pingbacks.

    For reference, this support question is related:

    http://wordpress.org/support/topic/37706

    There the poster ran two weblogs and wanted to link back and forth between them without pingbacks showing up. The suggested solution was to turn pingbacks off entirely, but what the poster really needed was a pìngback whitelist/blacklist.

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I asked about this quite some time ago.
    I was told that such behaviour is useful for someone else as if they come across either post the ping links them so providing a fuller picture of what you have posted.

    I know that does not answer your question - I don't have that, and I'm not aware of a white/blacklist for pings.

  3. By default WordPress is configured to try and trackback/pingback all urls linked in a post which is why this happens.

    I don't know of a way to blacklist sites that you don't want to automatically pingback but it may be possible to write a plugin to achieve this.

    However what you can do is disable the automatic pingback on all urls linked in a post - this will mean that you will have to copy trackback urls that you do want to pingback/trackback into the "TrackBack a URI:" box on the simple posting screen or the "Send trackbacks to:" box on the advanced posting screen.

    To achieve this you need to do the following:

    1. In the admin panel goto Options ... Discussion
    2. Untick "Attempt to notify any Weblogs linked to from the article (slows down posting.)"
    3. Click on "Update Options" to save the change

    Now when posting you must remember to put all the uri's you wish to trackback/pingback into the relevant box.

    Hope this helps
    westi

  4. Minna
    Member
    Posted 9 years ago #

    What about using a relative path to the post, did that help? I can't remember...

  5. gregh
    Member
    Posted 9 years ago #

    I was told that such behaviour is useful for someone else as if they come across either post the ping links them so providing a fuller picture of what you have posted.

    I understand that the WordPress default is to ping all URLs in the post indiscriminately but I question whether a pingback from your weblog to your weblog is a very useful thing. I mean, isn't it fairly common to put things in your posts like, "the other day when I wrote about this", and have a link back to that post? In that case you've already explicitly made the link so that users can come across the post. Is it really that useful to have a pingback? Is it in keeping with the spirit of the whole pingback idea?

    If you look at the Codex entry for pingback it says, "Pingback lets you notify the author of an article if you link to his article (article on a blog, of course)." I think that the spirit of the whole Pingback idea is to notify other authors that you're linking to them, not to "notify" yourself. Same thing if you look at the official pingback specification: "Pingback is a method for web authors to request notification when somebody links to one of their documents."; notification that "somebody" has linked to my document, not a reminder that I have linked to my own document.

    This could actually be very useful if it were neatly formatted in the form of a "related links" section, but the trouble is that the pingbacks are mixed in with the comments and tend to be fairly ugly. Stuff like this:

    [...] [...] Chapter 04 [...] [...]

    Do you really want ugly pingbacks like that appearing in the comments?

    It seems a shame that in order to suppress these unnecessary pingbacks you have to turn off the functionality entirely, or manually delete the unwanted pingbacks every single time you make a post, or avoid the pingbacks by forgetting about providing your users with useful references to related documents. I am totally new to WordPress but I am going to take a look at the code and see how much would be involved in suppressing this undesirable behaviour.

  6. Mark (podz)
    Support Maven
    Posted 9 years ago #

    "I mean, isn't it fairly common to put things in your posts like, "the other day when I wrote about this", and have a link back to that post?"

    Yes, but the older post has no forward link unless you either go back and edit it in, or ping it.

  7. gregh
    Member
    Posted 9 years ago #

    Just discovered this related post:

    http://wordpress.org/support/topic/3468

  8. skippy
    Member
    Posted 9 years ago #

    As podz said, pinging an older post on your blog provides a forward link from the old post to the new post.

    Again, this does not exactly address your problem, but Seperation Anxiety is a plugin that will seperate pings from comments. I use this, along with the ping / track / comment count plugin, to display only comments under my posts, and put pings in my sidebar.

  9. gregh
    Member
    Posted 9 years ago #

    As podz said, pinging an older post on your blog provides a forward link from the old post to the new post.

    Yes, an exceedingly ugly forward link. I am sure I am not the only person who doesn't want this kind of clutter in the comments. If I want forward links I'll go back and put them in. If they can't be auto-generated in an attractive way then I'd rather not have them auto-generated. Apart from the visual ugliness "self" pingbacks make the weblog look unpolished and undisciplined in that they give the impression that the author is too lazy to keep links between related content where they belong. Turning off pingbacks entirely is not an acceptable solution.

    To solve this problem I've hacked together a plugin that automatically diverts any "self" pingbacks into the moderation queue. At least that way I can delete them more easily without them ever polluting the public site.

    I would love to see a "related posts" plugin that automatically found "self" pingbacks and neatly formatted them into a "related posts" box at the bottom of each post and prevented them from being displayed in the comments area. I'll see if I can extend my plugin to do that but I'm doubtful that it will be possible without getting into some fairly extensive hackery which may require my templates (or worse, the WordPress source code itself) to be customized as well.

  10. gregh
    Member
    Posted 9 years ago #

    What about using a relative path to the post, did that help? I can't remember...

    Yes. Paths without the full http://servername/ prefix do not produce self-pingbacks. Given that you do not know where the link will be displayed (front page, date archives, category archives, individual article etc) you must still make sure the link starts with an absolute path (eg. /2005/07/02/foo) so that your links won't break.

  11. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I agree they are ugly :)

    There is a related posts plugin but I'm not sure how it does the relating.

  12. skippy
    Member
    Posted 9 years ago #

    I filed ticket 1489 in response to this thread. Feel free to comment there, and/or offer other solutions.

  13. gregh
    Member
    Posted 9 years ago #

    Thanks for everyone's help and suggestions on this one. I have put the source of the plug-in that I hacked together online:

    http://greghurrell.net/wp/2005/07/02/autorelated-plug-in/

    For now it just forces the unwanted pingbacks into the moderation queue. I'll keep working on it though with a view to rolling in the "related posts" functionality (hence the name, "Autorelated").

  14. gregh
    Member
    Posted 9 years ago #

    Ok. I've now rolled in the "related posts" functionality. Works quite well.

  15. TechGnome
    Moderator
    Posted 8 years ago #

    Yes, but the older post has no forward link unless you either go back and edit it in, or ping it.- podz

    No offence podz, but who gives a flying fart? The ping will just end up in the mix of comments that many people proly just skim over anyways and won't realize that it liks back to a cross-post on the site. Especialy when you exceed a comment threashold. I tend to skip at random comments once I get past about 15 or so.

    Secondly it's friggin annoying to be getting emails that you posted to yourself from your own site....

    If I feel that it is necessary that people read the NEW entry (which will be closer to the top anyways) after reading the OLDER entry then I'll add a link into the older post telling them they should also go read the newer one.

    Crap.... now I have cross pings.... one from the new post to the older one, and one from the older one to the new one.

    Click, click, click, delete.
    Click, click, click, delete.

    Tg
    -but I'm just a gnome and we all know that a gnome's opinion don't amount to a hill of beans.-

  16. Mark (podz)
    Support Maven
    Posted 8 years ago #

    "I was told......" is at the top
    and
    it's only a ping

    :)

  17. popstat
    Member
    Posted 8 years ago #

    There are some of us who actually appreciated the ability to selectively tick that checkbox for pingbacking in 1.2... As far as I'm concerned, removing it was a mistake for 1.5.xxx. I'm disappointed that it appears pingbacks is falling by the wayside in WP for no other reason than disinterest by the developers.

    Yeah, the pingback output was pretty ugly; but I found that to be a plus, because they were very easy to visually identify when scanning through comments. Plus, I rigged them to include the pinging post's title (here's an example).

    Now, to avoid the hassle of changing the Options on a per-post basis, I just resort to trackbacks for intra-blog linking (which I do a lot, and can't imagine not taking advantage of). It does the job, but it involves an extra step I wish wasn't ncessary.

  18. altjira
    Member
    Posted 8 years ago #

    Some spirited discussion here. I fall in the don't-want-those-ugly-pingbacks-in-my-comments and hate-those-stupid-emails camp myself, but I see the point of those who think automated forward linking is a good idea. So what's the best solution? Hacking the functions.php (which will disappear next time I update,) using gregh's plugin (but I don't even want to moderate those pingbacks,) or disabling pingbacks altogether? I really think there ought to be user-set options, and I think the active debate here shows that.

  19. altjira
    Member
    Posted 8 years ago #

    Woah! Forget the hack functions.php option. It results in "Parse error: parse error, unexpected T_VARIABLE in .../wp-includes/functions.php on line 747." The hack was a year old, and it looked like it would work, but it doesn't.

  20. Jonathan Landrum
    Member
    Posted 7 years ago #

    So, has anyone come up with a real solution to this? Deleting emails and self-pingbacks is getting sort of old.

  21. The answer is above, and in other threads in the forums.

    To summarise, when linking to your own posts, use a relative path, not the full path.

    So instead of

    <a href="http://www.domain.com/wordpress/2006/09/14/a-cool-old-post">I wrote this yesterday</a>

    Use this:

    <a href="/wordpress/2006/09/14/a-cool-old-post">I wrote this yesterday</a>

    Do that, and you won't get a ping.

  22. Jonathan Landrum
    Member
    Posted 7 years ago #

    Schnawsome. I'll do that from now on. Thanks, Les.

  23. Michael Adams (mdawaffe)
    Member
    Posted 7 years ago #

    You can use absolute links. Just use this plugin: No Self Pings

  24. ia
    Member
    Posted 7 years ago #

    WordPress has this quirk of resending pings when I re-save a post. Is there any way to prevent those duplicate pings? Those ones are even more annoying!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags