• Resolved Kyle Duncan

    (@kyleduncan)


    Hi there,

    I’m using bbPress and have a couple of questions about working with this plugin – which is great by the way! Theme My Login has totally sorted out my site for:

    1. determining where to send users on login/logout
    2. preventing any wp-admin access at all for non-admin users

    The only thing i’m stuck on is how to use bbPress’s login/register/edit profile/lost password pages instead of the built in Theme My Login pages. So for example, i have these URLs that i’d like to use:

    1. Login: /discussions/sign-in/
    2. Register /discussions/register/
    3. Lost password: /discussions/lost-password/
    4. Profile: /discussions/users/username/

    Is there any way to use these with the plugin, instead of the ones it creates:
    1. /login/
    2. /register/
    3. /lostpassword/
    4. /your-profile/

    my concern is that currently people have two versions of every page, and they’re styled differently with different markup and content. I really need to keep the 4 bbPress pages for a few reasons, so need to use those instead of the TML ones.

    Thanks!

    https://ww.wp.xz.cn/plugins/theme-my-login/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    You could probably use the tml_page_link filter to change the URL for each action.

    function tml_page_link_filter( $link, $action, $query ) {
    
    	switch ( $action ) {
    		case 'login' :
    			$link = home_url( '/discussions/sign-in/' );
    			break;
    
    		case 'register' :
    			$link = home_url( '/discussions/register/' );
    			break;
    
    		/* Etc... */
    	}
    
    	return $link;
    }
    add_filter( 'tml_page_link', 'tml_page_link_filter', 10, 3 );
    Thread Starter Kyle Duncan

    (@kyleduncan)

    Thanks Jeff that’s really helpful. I’ve actually managed to switch over to TML templates for Lost/Reset password and Login and Logout, and I’m not using Register, so I think I’m ok. But i might use this filter for the Your Profile page, as the bbPress profile is very different because of forum-specific user content.

    I notice if somebody tries to visit Login/Lost pass/Reset pass/Register while they are logged in, they get redirected to the Login page but with the profile showing. is that correct? so the TML profile can appear on two pages (your profile and login)?

    And lastly, is it right that the only way to disable wp-admin access is to enable themed profiles? I’m actually not using themed profiles on ANY user type, because i use bbPress entirely (except for administrator who use wordpress dashboard) but i’d like to keep your admin blocking functionality. maybe i should just use another plugin for that, since it’s kind of separate?

    thanks again!

    Plugin Author Jeff Farthing

    (@jfarthing84)

    Visiting the login page with Themed Profiles active should redirect to the profile page.

    Yes, the Themed Profiles module must be activated in order to block the admin area. However, you don’t have to actually check the box to enable Themed Profiles for any roles.

    Thread Starter Kyle Duncan

    (@kyleduncan)

    Thanks for the advice, Jeff.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Working with bbPress’ is closed to new replies.