WordPress.org

Ready to get started?Download WordPress

Forums

Super Socializer
[resolved] Redirection after G+and Twitter login (3 posts)

  1. 2ann
    Member
    Posted 4 months ago #

    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

    https://wordpress.org/plugins/super-socializer/

  2. the_champ
    Member
    Plugin Author

    Posted 4 months ago #

    Hi,
    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)" />';
    				}else{
    					$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.

  3. 2ann
    Member
    Posted 4 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.