Theme My Login plugin

Hi,

I hope a wpmudev hero here can help me with this:

I want to use the Theme My Login plugin so I can use custom login/register etc. pages for my site.

When installed, the TML plugin creates a couple of pages where these login/register/reset etc. forms are being put. The URL’s will be: SITE.com/login, …/register, …/logout, …/resetpass etc.

But I want to change these URL’s. I’ve tried adding a few lines I’ve found on other forums to my functions.php and even a theme-my-login-custom.php, but it just won’t work.

Somebody here have any experience with this (and more importantly: a solution)?

Thanks!

  • Jude
    • DEV MAN

    Howdy Wouter

    Hope you are keeping well !

    Here is some code you can adapt to help with this

    function tml_action_url( $url, $action, $instance ) {
    if ( 'register' == $action )
    $url = 'http://mywebsite.com/registerme/';
    if ( 'logout' == $action )
    $url = 'http://mywebsite.com/logmeout/';
    if ( 'register' == $action )
    $url = 'http://mywebsite.com/registerme/';
    if ( 'login' == $action )
    $url = 'http://mywebsite.com/logmein/';
    return $url;
    }
    add_filter( 'tml_action_url', 'tml_action_url', 10, 3 );

    Replace your site and action urls there and put in in a mu-plugin. To create an mu-plugin, go to your /wp-content/ folder via FTP, and find the folder called “mu-plugins”. If there is no folder with that name, then you’ll want to create one. Then, create a file inside that folder, and give the file any name you like (making sure the file as an extension of .php, e.g. example.php) and paste the code in there.

    You don’t need to activate that plugin, as it will be always be automatically activated. Please be sure to add a PHP start tag at the beginning of the code if you insert this code as a mu-plugin, like this:

    <?php

    Thank you for being a WPMU DEV member and have a fantastic day!

    Cheers

    Jude

  • Tyler Postle
    • CGO

    Hey Mike,

    Wouter is likely referring to changing the slug/permalink from the edit page screen within the wp-admin. So go into your page listing and "edit" the page you are wanting to change the slug for then "edit" the permalink as seen in my screenshot.

    Hope that helps! If you have any trouble just let us know.

    Cheers,

    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.