Forums

Comments login redirect (9 posts)

  1. bbleaks
    Member
    Posted 1 year ago #

    Hey,

    I am thinking about going back to using the original wordpress comments, if I can figure out a way to change the login link to redirect to the mingle login page. When you aren’t logged in it says ‘You must be logged in to comment’. Is there a way to change that link? I am trying to redirect my readers to a different login page.

    Thanks!

  2. xdesi
    Member
    Posted 1 year ago #

    Check comments.php template file and it should be in there somewhere

  3. bbleaks
    Member
    Posted 1 year ago #

    Yea, I did. I edited the html link it had set as , but that did not change it :(

  4. bbleaks
    Member
    Posted 1 year ago #

    set as: <a href="%s"> lol

  5. xdesi
    Member
    Posted 1 year ago #

    You have edited the comments.php template and re-uploaded but the link is still reading the old URL?

    Try adding some dummy text around that link somewhere (e.g <h1>test</h1>) just to ensure your changes are actually being made.

    Also what is %s ?

    If still in doubt post comments.php if poss

  6. bbleaks
    Member
    Posted 1 year ago #

    I have a comments.php and a comments-template.php

    I have changed the url, but it still links to http://bbleaks.com/wp-login.php?redirect_to=

    Here is the snippet of code from the comments-template.php file, look for 'You Must Be Logged In':

    [Code moderated as per the Forum Rules. Please use the pastebin]

  7. bbleaks
    Member
    Posted 1 year ago #

    Anyone else have an idea? Please help :)

    Here is the code:

    'must_log_in' => '<p class="must-log-in">' . sprintf( __( 'You must be <a href="http://www.bbleaks.com/login">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',

  8. bbleaks
    Member
    Posted 1 year ago #

    The above code is what I changed, but it doesn't seem to be affecting the comments section. Please help!

  9. xdesi
    Member
    Posted 1 year ago #

    wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',

    This function outputs the normal login URL so you don't want to use this, instead you need to manually add your link where ever it is appearing.

Topic Closed

This topic has been closed to new replies.

About this Topic