I am trying to change the permalink #comment-xy to #customname-xy. When i change the corefile comment-template.php on line 754 to
$link = $link . '#customname-' . $comment->comment_ID;
I achieve the desired result. But of course this is not elegant.
So, i tried to add a filter to my functions.php:
/*has no effect*/
function directcommentlink( $link ) {
global $post;
$hash = '#customname';
return get_permalink( $post->ID ) . $hash;
}
add_filter( 'get_comments_link', 'directcommentlink' );
But this filter has no effect. What is wrong with this filter? Thanks for your interest. theo