Support » Plugin: Theme My Login » Redirect on Login

Viewing 5 replies - 1 through 5 (of 5 total)
  • Ok, after a LOT of digging around and randowm playing, I think I have found the problem…

    I am using the function wp_loginout() to generate the URL which I am adding to my menu bar through my theme’s functions.php (I don’t want a sidebar.)

    Anyway, I was using it as wp_loginout('index.php',false) since I wanted to go back to the index page. I have changed the call to wp_loginout('',false) and it now seems to follow the settings made through TML 🙂

    Just posting here in case anyone else stumbles across this problem….

    This might be affecting me – where do you find the function wp_loginout() to edit this?

    I am having the same issue and would like to know where you modified the code. I have not had any success finding it.

    mrsplat06, if you’re using TML on its own, just click on the TML link on the left side of your Dashboard, and on the general settings, make sure to check “Enable custom redirection.” Then a “redirection” link will appear, click on that to set your redirects. But make sure to notice that there are redirect settings for every level, in my case, I scrolled down to the bottom because I only wanted to redirect subscribers.

    I’m also using TML in conjunction with Paid Membership Pro, so I also had to hand-code redirect on login based on membership level, which went into the functions.php file … if you need assistance with something like that, let me know.



    Sorry for not replying sooner!

    As marvmckay said, you can set up the redirection directly in TML. My problem was that it was ignoring those redirections.

    My default, the login link is part of the sidebar and you don’t need to worry about it (THAT one works). My theme modifies this though as I don’t have a sidebar at all. I add the login / logout link to my main menu with the following code (in the functions.php of my theme):

    add_filter('wp_page_menu', 'add_login_logout_link', 10, 2);
    function add_login_logout_link($items, $args) {
        $loginoutlink = wp_loginout('',false);
    	if($pos ===false){
            $items .= '<li>'. $loginoutlink .'</li>';
    	   $items = substr($items,0,$pos).'<li>'. $loginoutlink .'</li>'.substr($items,$pos);
        return $items;

    You can see the call to wp_loginout() there on the first line of the function and it was this that I changed from my original attempt where the first parameter was ‘index.php’ instead of ”


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirect on Login’ is closed to new replies.