Forums

SimpleModal Login
How to use this with get_comment_reply_link? (2 posts)

  1. MtnExile
    Member
    Posted 5 months ago #

    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?

    http://wordpress.org/extend/plugins/simplemodal-login/

  2. MtnExile
    Member
    Posted 5 months ago #

    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?

Reply

You must log in to post.

About this Plugin

About this Topic