I’m creating a listings site and i am trying to let my listed businesses host their own public-facing profile.
On my site, I am trying to let my members have their own public facing member profiles (like OpenTable) , but they need to have some buttons that site visitors are unable to see on their profiles (i.e. “edit profile” which takes them to an “Edit Profile page”. How do I hide specific elements from users who are not the owner of that page or show to owner only ?

You can see this example here for a similar example that gives each user their own profile page and edit profile page and will only show a profile button if the user is logged into the site.
Plus, the profile button is coded so it only goes to the members own profile page by using the members user Id in the link.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area
If you have the profile page url in your database already, then you can simply set it up so that it only shows that link if the owner is logged in by using the dataset filter as shown here.
https://support.wix.com/en/article/filtering-database-content-displayed-on-your-page
Otherwise, you can just use the Wix Users API and use current user to then get the users Id and go from there
https://www.wix.com/corvid/reference/wix-users.html
https://www.wix.com/corvid/reference/wix-users.html#currentUser
https://www.wix.com/corvid/reference/wix-users.User.html#id
There is an example in the Wix Users API for working with the Wix members app collection of Members/PrivatemembersData and getting the users lastname.
How can I get the current user’s name?
Use the currentUser property to get the current user’s id. Then query the Members/PrivateMembersData collection for the item with that _id.
wixData.query("Members/PrivateMembersData")
.eq("_id", wixUsers.currentUser.id)
.find()
.then( (results) => {
lastName = results.items[0].lastName;
} );
@givemeawhisky Oh wow! This is a lot but immensely helpful! i will have to try this and hopefully you can help me if there is any reason i am unsucessful. If you also happen to know if there is a video out there that does all of these functions, i would also greatly appreciate it! I truly appreciate your help!
Do you happen to assist directly with projects at all?
@aalexandriaproductio If you find that you are having difficulty with code and need assistance, you may want to check out the Wix Marketplace - it’s a place where you can look for Corvid experts for hire.
Hi Yisrael, i have reached out to two Wix Corvid experts but after letting them know what i need, they have been unresponsive. Is there any one who is reliable who can assist?
@givemeawhisky oh my goodness i think i did it! This is the code i used:
import wixUsers from ‘wix-users’ ;
import wixData from ‘wix-data’ ;
import wixLocation from ‘wix-location’ ;
$w.onReady( () => {
if (wixUsers.currentUser.loggedIn) {
$w( “#editProfilebutton” ).show();
}
else {
$w( “#editProfilebutton” ).hide();
}
} );