by replacing #readmore-{$id} with 'comments' at both locations as shown below.
The 'comments' refer to the /comments prefix for the link.
Seems to be working tho - hopefully will not blow-up eventually.
This combined with Arvid's suggestion above seem to work fully for 'comments' at both levels. Heading wise & [read more] wise.
Code: Select all
}
if ($MODE == 'manual' || $MODE == 'semiauto') {
if (($p = strpos($string, '[more]')) !== false) {
return substr($string, 0, $p) . "<span class=\"readmore\"><a href=\"" . get_permalink($id) . "[color=#FF0000]comments[/color]\">" . $readmoreString . "</a></span>";
}
} elseif ($MODE == 'sentence') {
$matches = array();
if ($v = preg_match_all('|[.!?]\s|', $string, $matches, PREG_OFFSET_CAPTURE)) {
if (count($matches [0]) > $CHOP_AT) {
$string = substr($string, 0, $matches [0] [$CHOP_AT - 1] [1]) . ". <span class=\"readmore\"><a href=\"" . get_permalink($id) . "[color=#FF0000]comments[/color]\">" . $readmoreString . "</a></span>";
}
}