WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Login Redirect to Template file (2 posts)

  1. trinzia
    Member
    Posted 1 year ago #

    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.
    http://codex.wordpress.org/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!

  2. trinzia
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic