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?
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 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.