I am trying to change the URL for the "Log in to reply link" in my comments as shown in this image v
I did come across this snippet of code that i thought would help, but it just seems to make the link disappear altogether.
if ( ! function_exists( 't5_do_not_ask_for_comment_log_in' ) ) {
add_filter( 'comment_reply_link', 't5_do_not_ask_for_comment_log_in' ); /** * Replaces the log-in link with an empty string. * * @param string $link * @return string */
function t5_do_not_ask_for_comment_log_in( $link ) {
if ( empty ( $GLOBALS['user_ID'] ) && get_option( 'comment_registration' ) ) {
return ''; // add your link here
}
return $link;
}
}
I realise that I am probably missing something really really obvious as I am completely new to php, so please be gentle. Thanks.
</div>