• Hi,
    I have a classifieds website where the user can register, login, and place ads.
    The website serves a custom template to my android app users after checking for the specific query parameter “inapp=true” in the URL.
    However, the user does not get served the custom template on the login page as it is actually a redirect page, similar to when we directly go to wordpress /wp-admin page and get served with login.php (if not logged in).
    The problem is that the query parameter is being added as “?inapp=true” and not as “%3inapp=true” in HTML format to the redirect_to login url and therefore not being recognized as a valid parameter. I use code snippets to modify the code. Any solutions, please.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yeah, something is URL encoding parts that shouldn’t be, a common coding error. You could try using the “login_redirect” filter to replace the %3cinapp= with a proper ?inapp=. Use a large priority argument to help ensure your filter callback has the final say in the result.
    https://developer.wordpress.org/reference/hooks/login_redirect/

    Maybe a better solution would be to have the responsible code corrected by its developer so others can benefit from the change.

Viewing 1 replies (of 1 total)

The topic ‘adding query parameter to login redirect url’ is closed to new replies.