This topic has 1 reply, 2 voices, and was last updated 11 years by SQadmin.

  • Author
  • #1213
     fingolfin75
    Participant

    Hello,
    I have a WordPress site, a social network with installed your template and I would like to have an information.
    I’m developing a mobile app that takes advantage of the site login to access.
    I’m trying to login bypassing the standard webpage, using a url string with GET parameters. I need it because I want to login from mobile devices by sending the code for push notifications that will be saved on the wordpress database appropriately modified.
    The login is successful, but immediately after a redirect goes to index.html deleting the url I pass with the parameters, so I can’t save them to the WordPress database. It’s possible to know what are the redirects after login? I tried to check in the code but I could not find the redirects path.

    I’m sorry for my english.

    Regards.

    Tiziano

    #1225
     SQadmin
    Keymaster

    Hi if you are using the login modal it has a filter applied for the redirection.
    The modal is found in sweetdate/page-parts/general-login-modal.php
    You can manually edit the parameter for wp_login_url() function:

    COPY CODE
    
    form action="<?php echo wp_login_url(apply_filters('kleo_modal_login_redirect', '')  ); ?>"
    

    or use the filter in your functions.php:

    COPY CODE
    
    add_filter('kleo_modal_login_redirect', 'my_redirect');
    function my_redirect()
    {
    return 'http://mysite/?param=val';
    }
    

    If you are not using the modal then u can do like this:

    COPY CODE
    
    add_filter("login_redirect","kleo_redirect_to",100,3);
     
    function kleo_redirect_to($redirect_to_calculated,$redirect_url_specified,$user){
            return 'http://my_url';
    }
    

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Redirect after Login’ is closed to new replies.

Log in with your credentials

Forgot your details?