Integration wordpress comments with a member

Discussion in 'Integration' started by marc_etienne71, Dec 3, 2012.

  1. marc_etienne71

    marc_etienne71 New Member

    Joined:
    Feb 18, 2012
    Messages:
    8
    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 ?
  2. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    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.
  3. gswaim

    gswaim CGI-Central Partner

    Joined:
    Jul 2, 2003
    Messages:
    641
    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'106);
    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_identitywp_logout_urlapply_filters'the_permalink'get_permalink$post_id ) ) ) );
     
        return 
    $args;
     
    }  
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Actually latest plugin already should do this.
    It have an option to redirect wordpress login links to amember.

Share This Page