add "like" button function

I’d like to add “like” button on a post in blogs and so forth on my WIX website. When I inquired about this at WIX, two customer care representatives told me that the company does not support a “like” button restricted to login users of the website that I would like it to be. I have read some articles from the forum that some users have done like how I wanted by working on coding. Basically, I want my posts on the website in public but to “like” it or “comment” on it, I want to restrict such features for login users.

Can someone who has run into the same issue help me with this?

Look at the examples here for customizing your blog.
https://www.wix.com/corvid/examples?category=blog

The Wix Blog app already has a likes button itself.
https://support.wix.com/en/article/showing-or-hiding-the-comments-and-likes-counters-in-the-new-wix-blog

This is all stored in the read only Wix Blog collections.
https://support.wix.com/en/corvid-by-wix/wix-blog-with-corvid

You can add the custom likes and comments as shown in the examples and simply check the current user at the start of your code to see if the user is a currently logged in member. If they are then show the likes and comments parts etc, if not then hide them.
https://www.wix.com/corvid/reference/wix-users.html
https://www.wix.com/corvid/reference/wix-users.User.html#loggedIn

You can see a basic example of it being used in this previous post here.
https://www.wix.com/corvid/forum/community-discussion/lightbox-show-hide-based-on-user-login-status

If you want to do something similar for after the user has logged in as well, then use onLogin() function.
https://www.wix.com/corvid/reference/wix-users.html#onLogin

This will just basically do something after the user has logged in, so in your case you would have the views and comments parts shown.

As this would apply across your whole site, you might want to add it to your site code tab. If you add it to the page code tab it will only apply to that one page only.

I understand and thank you for the information. I have tried this but I’d like to know how to find “Onlick” of heart icon “like” button because I want to add OnEvent after OnClick for the heart icon (“like” button) to customize exactly how I want to utilize the blog page on the web.

If you are using the Wix Blog custom like example, then the onClick event is already added into the code itself.
https://www.wix.com/corvid/example/custom-like-button

 $w('#likeButtonDefault').onClick(async () => {

If you are wanting to add the onClick event handler function yourself through the properties panel, then you can as shown here and it will add it to your page code as export function…

Although, for the like example linked above, whichever onClick method you use, you will need to make sure that the onClick event is set as async.