# How to link to a dynamic member profile?

**URL:** <https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712>\
**Category:** Ask the community\
**Tags:** question, code, wix-members-area\
**Created:** [July 11, 2021, 7:45pm UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712 "2021-07-11T19:45:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hmkhrisat98](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/hmkhrisat98/32/29121_2.png) [@hmkhrisat98](https://forum.wixstudio.com/u/hmkhrisat98)\
**Post date:** [July 11, 2021, 7:45pm UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712/1 "2021-07-11T19:45:23Z")

</div>

I believe it should be a really simple thing but I keep getting 404 error. Can anyone please help.

$w . onReady ( **function** (){  
$w ( ‘#button1’ ). onClick ( **function** (){  
**let** email = $w ( ‘#loginEmail’ ). value ;  
**let** password = $w ( ‘#loginPassword’ ). value ;  
wixUsers . login ( email , password )  
. then (()=\>{  
wixLocation . to ( ‘/members/{Email}’ );  
})  
})  
})

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [July 12, 2021, 6:20am UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712/2 "2021-07-12T06:20:35Z")

</div>

I see that you are redirecting to:

```javascript
wixLocation.to('/members/{Email}');

```

Do you have a members page? Or is it Members?

Typically, you should redirect based on user ID. So, after the user has logged in, it would look something like this:

```javascript
wixLocation.to(`/Members/${wixUsers.currentUser.id}`);

```

---

<div class="post-metadata">

**Author:** ![hmkhrisat98](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/hmkhrisat98/32/29121_2.png) [@hmkhrisat98](https://forum.wixstudio.com/u/hmkhrisat98)\
**Post date:** [July 12, 2021, 12:00pm UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712/3 "2021-07-12T12:00:54Z")

</div>

![](https://us1.discourse-cdn.com/wix/original/3X/1/d/1d849e69908bafb219c8c1aa5b92b129b6956e1a.jpeg)

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [July 13, 2021, 6:05am UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712/4 "2021-07-13T06:05:29Z")

</div>

You are using the incorrect tick mark. You want to use the backtick ` and not the single quote '.

You want this  
wixLocation . to ( `/members/](wixLocation.to(`/Members/${wixUsers.currentUser.id}`);) [${wixUsers.currentUser.id}](wixLocation.to(`/Members/${wixUsers.currentUser.id}`);) [` );

**not** this:  
wixLocation . to (’ /members/ ${wixUsers.currentUser.id}’ );

See [Template Literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) for more information.

---

<div class="post-metadata">

**Author:** ![hmkhrisat98](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/hmkhrisat98/32/29121_2.png) [@hmkhrisat98](https://forum.wixstudio.com/u/hmkhrisat98)\
**Post date:** [July 13, 2021, 3:40pm UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712/5 "2021-07-13T15:40:17Z")

</div>

I did change it to backticks but unfortunately still no luck

---

<div class="post-metadata">

**Author:** ![jumanakaid12](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/jumanakaid12/32/8446_2.png) [@jumanakaid12](https://forum.wixstudio.com/u/jumanakaid12)\
**Post date:** [July 13, 2021, 5:52pm UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712/6 "2021-07-13T17:52:36Z")

</div>

I am having the same issue, I am trying to let the onClick function of (my profile) button to take the member to the dynamic profile page. I have used the same code posted above and used the backtick but it seems that it is not responding. I have tried to change the location and the code would work fine for a static page (without the id part)

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [July 14, 2021, 9:17am UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712/7 "2021-07-14T09:17:16Z")

</div>

Is the site member logged in?

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [July 14, 2021, 9:21am UTC](https://forum.wixstudio.com/t/how-to-link-to-a-dynamic-member-profile/37712/8 "2021-07-14T09:21:06Z")

</div>

See the [Velo Tutorial: Building Your Own Members Area](https://support.wix.com/en/article/velo-tutorial-building-your-own-members-area#code) .
