WordPress.org

Forums

Peter's Login Redirect
[resolved] Need help with syntax for creating a dynamic URL (3 posts)

  1. dnbWP
    Member
    Posted 1 year ago #

    I just downloaded/enabled this plug-in and it works great. I noticed the comment "Note that you can use the syntax [variable]username[/variable] in your URLs so that the system will build a dynamic URL upon each login, replacing that text with the users username" and thought that sounded like a neat feature but I'm not exactly sure how to implement it. Can someone provide an actual example of what I should enter in the URL field? Whenever someone asks about this all they are told is to "use the syntax [variable]username[/variable]" but I don't know how! Thank you. db

    https://wordpress.org/plugins/peters-login-redirect/

  2. Chris Dillon
    Member
    Posted 1 year ago #

    On the "Login/logout redirect" settings page:

    To send Paco to dogwalkers.com/paco when he logs in, enter

    [variable]username[/variable]

    in the Specific Users > URL field.

    To send him to dogwalkers.com/paco/wp-admin, enter

    [variable]username[/variable]/wp-admin

    in the Specific Users > URL field. A trailing slash is accepted but not necessary.

    [variable]username[/variable]/wp-admin/

    To send him to dogwalkers.com/paco/my-new-puppy, enter

    [variable]username[/variable]/my-new-puppy

    in the Specific Users > URL field.

    The path is relative to your main site URL so do not include http://dogwalkers.com/ in the URL.

    This only works if he logs in from your main site. If he is also a user on Farley's site, and he logs in from Farley's site, he will get the standard WordPress redirect, dogwalkers.com/farley/wp-admin/.

  3. dnbWP
    Member
    Posted 1 year ago #

    Thanks Chris! It wasn't clear to me that "[variable]username[/variable]" is EXACTLY the text string with which you need to prefix your URL/path. I was trying to SUBSTITUTE the "variable" (and "/variable") with a URL or part of a URL or something. I tried it and it worked as it should. David

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Peter's Login Redirect
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.