• Resolved 2ann


    Hello Champ!
    I use social login in coments form only.
    I put the checkbox for Login redirection to “Same page where user logged in”.
    1) After login via G+ it redirects to the same post but at the top of the page.
    2) After login via Twitter it redirects to the main page.

    I want it to redirect to the same post the same part of the page (comment section). Is it feasible?

    thx in advance


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Rajat Varlani


    Follow the steps mentioned below to achieve the desired result:
    1. Open “wp-content/plugins/super-socializer/inc/social_login.php” in code editor.
    2. Search following code:

    $html .= '" onclick="theChampInitiateLogin(this)" />';

    3. Replace the code searched above with following and save the file:

    if(current_filter() == 'comment_form_top'){
    					$html .= '" onclick="theChampCommentFormLogin = true; theChampInitiateLogin(this)" />';
    					$html .= '" onclick="theChampInitiateLogin(this)" />';

    4. Open “wp-content/plugins/super-socializer/js/front/social_login/common.js” in code editor.
    5. Search following code:

    function theChampInitiateLogin(icon){

    6. Place following code above the code searched above

    var theChampCommentFormLogin = false;

    7. Search following code:

    location.href = '<?php echo the_champ_get_login_redirection_url(); ?>';

    8. Replace the code searched above with following and save the file

    location.href = '<?php echo the_champ_get_login_redirection_url(); ?>'+(theChampCommentFormLogin ? '/#commentform' : '');

    Now when user will login from the G+ Social Login icon at comment form, he will get redirected to the comment form.
    I will soon fix this issue with Twitter login and let you know.

    Hi the_champ,
    G+ login now is what I wanted, thanks a lot!
    Looking forward to your futher directions regarding twitter.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirection after G and Twitter login’ is closed to new replies.