• I’ve got the plugin working fine in the header, and in the “Leave a comment” box, but the “Log in to reply” link simply takes you to the standard WordPress login screen. So far as I can tell, the file controlling these links is comment_template.php in the wp-includes folder. It doesn’t make use of wp_loginout, so Simplemodal-login can’t use filters to add the class “simplemodal-login” to the link.

    I tried to add the class to

    $link = "<a rel='nofollow' class='comment-reply-link' href='" . get_permalink($post->ID)

    so that it read

    $link = "<a rel='nofollow' class='comment-reply-link simplemodal-login' href='" . get_permalink($post->ID)

    but that didn’t work. Being a newby, I’m out of ideas. Does anyone know the proper way to make these links open in modal windows?

    https://www.ads-software.com/extend/plugins/simplemodal-login/

Viewing 1 replies (of 1 total)
  • Thread Starter MtnExile

    (@mtnexile)

    Fixed it. It helps enormously if you’re actually applying the change to the right line, which should have been

    $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $login_text . '</a>';

    So it’s working perfectly now. One last question: is there a way to accomplish this without changing a core file?

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: SimpleModal Login] How to use this with get_comment_reply_link?’ is closed to new replies.