WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
[resolved] Templates don't work (9 posts)

  1. Chintaru
    Member
    Posted 3 years ago #

    Hi,

    I've been trying to add some text to my login-form.php template, which I first copied to my main theme's folder. The comment in the file states that the plugin checks the theme folder first before the templates folder of the plugin. However, it doesn't seem to read both at all. I tried adding the content to both files and it didn't show up whatsoever. The source of my login page is also different from what's in login-form.php. Is there something I need to change in order for the templates to be used by the plugin at all?

    Also, the login redirect doesn't work. I set a custom URL to be redirected to after login for admins but no matter what setting I enable, it always goes to the logged in page.

    Any help would be greatly appreciated.

  2. Jeff Farthing
    Member
    Plugin Author

    Posted 3 years ago #

    Custom templates are to be placed in the active theme's directory, such as wp-content/themes/twentyten, not just wp-content/themes.

  3. Chintaru
    Member
    Posted 3 years ago #

    I know that, and that's what I did. It did work for the register template but not for login-form.php.

  4. Jeff Farthing
    Member
    Plugin Author

    Posted 3 years ago #

    Surely the plugin uses the template. Perhaps another plugin is generating the form or even the wp_login_form() function?

  5. Chintaru
    Member
    Posted 3 years ago #

    I figured out that it's because of the fact that I use custom templates. Can I make the plugin work with them?

  6. Jeff Farthing
    Member
    Plugin Author

    Posted 3 years ago #

    Not sure what you mean.

  7. Chintaru
    Member
    Posted 3 years ago #

    I already managed to load the plugin into my theme with custom templates by using do_shortcode(); instead of using a seperate Login page. It seems to work properly now, except for the redirects which still puzzle me a bit. For instance, when I log in as an admin, it takes me to the "logged in" page (with the userlinks) and not the Dashboard, as set.

  8. Jeff Farthing
    Member
    Plugin Author

    Posted 3 years ago #

    You should use theme_my_login() instead of do_shortcode().

  9. Chintaru
    Member
    Posted 3 years ago #

    Right, thanks for the heads-up ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic