Viewing 6 replies - 16 through 21 (of 21 total)
  • Plugin Author radiok

    (@radiok)

    mlombaard, did you ever figure this out?

    mlombaard

    (@mlombaard)

    Radiok said: “mlombaard, from Redux, no, but many many users have been using Peter’s Login Redirect with great success.”

    i checked it out and contacted peter. his plugin is the best out there, but even his plugin can’t redirect a user back to the page they were viewing before registering/logging in.

    radiok said:”mlombaard, did you ever figure this out?”

    if there is a built in way to do this with wordpress, i didn’t figure it out. i went and got a freelancer on https://www.vworker.com to write a script that did exactly this for me.

    i guess i’m gonna need a freelancer to modify peter’s plugin to redirect users back to the page they were viewing, unless any of you know of a way to do it.

    take care!

    FrancescoRizzi

    (@francescorizzi)

    Here’s a function from one of my themes that should do what mlombaard was asking for (although it doesn’t interact with RPR)
    Sorry for the length of it, but it has i18n weaved in.
    HTH,
    FR

    if ( ! function_exists( 'FRDF_LoginRegisterLogoutAdmin' ) ):
    function FRDF_LoginRegisterLogoutAdmin() {
    	$full = '';
    	if(is_user_logged_in()) {
    		$full = sprintf( _x('<a href="%1$s" title="%2$s">%3$s</a> or <a href="%4$s" title="%5$s">%6$s</a>', 'FRDF Format for Admin/Logout links', FRDF_TEXTDOMAIN),
    			admin_url(),
    			_x('Enter the Administrative area', 'FRDF Title for Link to Admin area', FRDF_TEXTDOMAIN),
    			_x('Admin Area', 'FRDF Text for Link to Admin area', FRDF_TEXTDOMAIN),
    			wp_logout_url(),
    			_x('Logout', 'FRDF Title for Link to Logout', FRDF_TEXTDOMAIN),
    			_x('Logout', 'FRDF Text for Link to Logout', FRDF_TEXTDOMAIN)
    		);
    	} else {
    		$full = sprintf(_x('<a href="%1$s" title="%2$s">%3$s</a> or <a href="%4$s" title="%5$s">%6$s</a>', 'FRDF Format for Login/Register message', FRDF_TEXTDOMAIN),
    			wp_login_url(),
    			_x('Login', 'FRDF Login Link Title', FRDF_TEXTDOMAIN),
    			_x('Login', 'FRDF Login Link Text', FRDF_TEXTDOMAIN),
    			site_url('wp-login.php?action=register', 'login'),
    			_x('Create New Account', 'FRDF Register Link Title', FRDF_TEXTDOMAIN),
    			_x('Register', 'FRDF Register Link Text', FRDF_TEXTDOMAIN)
    		);
    	}
    	return $full;
    }
    endif;
    mlombaard

    (@mlombaard)

    hi,

    would i just simply paste this code into a spot in my functions.php file and update it?

    would it then redirect users back to the page they viewed before registering/logging in?

    thanks,

    mlombaard

    (@mlombaard)

    sorry if that sounded dumb, but i’m not a wordpress or php developer, so i’ve got no idea what to do with code unless a developer tells me what to do with it or where to put it.

    thanks for the script though, really appreciate it

    FrancescoRizzi

    (@francescorizzi)

    hey mlombaard. Sorry if I didn’t answer yesterday. Saw your questions come through as email but they were not displaye don the forum yet.
    I just sent you a reply – but for anyone else who may be reading this, yes:
    1. add the function to your theme’s functions.php
    2. call the function from the theme template file, where you want those links to appear:
    <?php echo FRDF_LoginRegisterLogoutAdmin(); ?>

    Other notes:
    ~ changing theme files like this means a theme update may throw your changes away: consider creating a child theme or your own theme
    ~ There’s i18n weaved in that function. If you want to retain that ability, please don’t use FRDF_TEXTDOMAIN as the text domain argument passed to _x (you probably want to use your own theme’s text domain in its place)

    HTH

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘[Plugin: Register Plus Redux] Not working in 3.0.2’ is closed to new replies.