WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Need help with syntax for creating a dynamic URL

[Resolved] Need help with syntax for creating a dynamic URL

  • 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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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/.

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Need help with syntax for creating a dynamic URL’ is closed to new replies.