@givemeawhisky I know you tried helping me with this the other day but due to the spam attack I had all my profile wiped. Just reaching out coz genuinely struggling on this one and can’t get the code right
@thomas80559 so first of all remove these extra parentheses. Then make sure you’re using the right page paths. If it still doesn’t work, try to console.log(userRole) and see what it logs.
Then publish and on the published page, click F12, and select the console tab.
It’s supposed to write there the current userRole.
Let’s see what it will write.
@thomas80559 - No need for me to help as looks like J.D. has already done an excellent job helping you with your issue.
However, one little thing I will mention that I am not sure that you have done is to do with the Member roles themselves in your Contacts list as you say that it still says Member when you read from the console log.
Easy way to check is to simply go into your Wix Dashboard, click on Customer Management and then Site Members.
If your Site Members have nothing listed under their Role tab, then they will be known as Member still, however, if you have added a Member to a specific role, then they will have that role listed in their Role field.
Hi @jonatandor35 I tried this code and got a little diflated when it didn’t work, but just spotted n error on line 9 that flags up parsing error: Unexpected token {
Tried to fix it but not sure where it’s incorrect.
@givemeawhisky thanks for this info. I did double check this and I have assigned certain members a role for testing purpose and I can see these displayed in the member table under role tab. Not sure as to why this isn;t being fed through or picked up in code???
J.D has been a genuine help on this. If his code doesn;t work I think I’m going to have to give up coz it’s just not happening which is a real shame coz it should be pretty simple I’d have though.
Please post the editor URL of your site. Only authorized Wix personnel can get access to your site in the editor.Please include the name of the page involved.