• Resolved trinzia

    (@trinzia)


    Hi,

    I have written a php file and added it to my template. This is what I want to load after login. I do not want to load a post or page, but instead my own php which I placed in the template files.

    There is an example in the Codex of how to redirect user home after login.
    https://codex.www.ads-software.com/Plugin_API/Filter_Reference/login_redirect
    I added this to my functions.php file, but nothing changed.

    Does anyone know how I may load a php file I added to template?
    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter trinzia

    (@trinzia)

    Solution:

    Go into the template file and add in the comments:
    /**
    * Template Name: My Page Name
    */

    Then when you create a page in the WordPress Admin panel, you can use your own php file from your theme.

    To redirect to it, check which plugins have the redirect. In my particular case, redirect comes via S2Member, but Theme My Login also has the option to add it.

Viewing 1 replies (of 1 total)
  • The topic ‘Login Redirect to Template file’ is closed to new replies.