Hi, I am trying to fix something here. When a user that is not logged in or registered to my website, he cannot write comments. This is working fine but when he clicks on login, it brings to the wordpress login and not the amember login. I know that the user can log to that wordpress page but it's not realy beautifull, + the user doesn't even know the site is a wordpress site or what is wordpress at all anyways! Is there a way to change that link to the amember login ?
I ran in to this a while back. StudioPress sent me some code to stick in the functions.php file that allowed me to change the URL on that link but can't put my hands on it right now. Hopefully somebody else can supply the code, if not I can look deeper.
Found it! Add this code to your functions.php file and modify the text as needed. This was originally designed for Genesis (StudioPress Framework) so you may have to do some tweaking. PHP: add_filter('genesis_comment_form_args', 'child_comment_form_args', 10, 6);function child_comment_form_args($args, $user_identity, $id, $commenter, $req, $aria_req) { $your_login_page = 'http://yoursite.com/amember.login.page'; $your_member_page = 'http://yoursite.com/amember.member.page'; $args['must_log_in'] = '<p class="must-log-in">' . sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.', 'genesis' ), $your_login_page ) . '</p>'; $args['logged_in_as'] = '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%s">%s</a>. <a href="%s" title="Log out of this account">Log out?</a></p>', 'genesis' ), $your_member_page, $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ); return $args; }
Actually latest plugin already should do this. It have an option to redirect wordpress login links to amember.