Written October 25, 2006. Tagged PHP, WordPress.
If you're reading this through a feed reader, you might have seen a lot of recent posts marked as new. This would be because I just changed the WordPress generation code slightly to compensate for a Bloglines issue.
The issue is that the part of a blog post after a cut will be all blue, because Bloglines will replace the cut anchor (something like <a id="more-123"></a>
) with some broken code of its own, including links that span the cut contents.
Ideally, Bloglines would solve this themselves. I reported the problem months ago. Since they haven't, though, I solved it for my own blog by simply making the cut anchor into a div
tag rather than an a
tag. The anchor still works, and Bloglines no longer messes with my feed.
I'm running WordPress 2.0. I've no idea if the problem or this solution apply to other versions. I did notice LiveJournal feeds get the same treatment, though…
The file to change is wp-includes/template-functions-post.php
, around row 90. Unidiff (download):
--- wp-includes/template-functions-post-old.php 2006-07-16 09:44:50.000000000 +0200
+++ wp-includes/template-functions-post.php 2006-10-25 20:46:47.000000000 +0200
@@ -87,7 +87,7 @@
$output .= $teaser;
if ( count($content) > 1 ) {
if ( $more )
- $output .= '<a id="more-'.$id.'"></a>'.$content[1];
+ $output .= '<div id="more-'.$id.'"></div>'.$content[1];
else
$output .= ' <a href="'. get_permalink() . "#more-$id\">$more_link_text</a>";
}