Skip Navigation

[Resolved] add a favorite or like button to photos

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#2012701
Xnip2021-04-06_16-05-46.jpg

Tell us what you are trying to do?

Our website will have many photos, and 1 function we need is to be able to let users "like/favorite/save" photos. Then on the user account page, I want to be able to show them all the photos they've "liked/favorited/saved". The list sounds like a custom field on the user account that has some kind of post relation to the media file? But I'd probably have to hook into the media display function to add some kind of "like/favorite/save" button that shows overtop of each image. Does that make sense? Is this doable with Toolset?

I understand it may take some php, which is fine. Just trying to head the right direction.

Is there any documentation that you are following?

Still looking for a solution

Is there a similar example that we can see?

hidden link (see attached photo)

What is the link to your site?

still in development

#2013101

Hello,

You might consider these:
1) Create a custom post type "Member", each "Member" post's author is different WP user, each user can have only one "Member" post
2) Setup many-to-many relationship between post types "photos" and "Member":
https://toolset.com/course-lesson/many-to-many-post-relationships/
3) In the single "photos" post, display a relationship form, for user to connect with their own "Member" post:
https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/
4) So in the single "Member" post, you can setup a view, display the related "photos" posts, like this:
- Query "photos" posts
- filter by relationship between "photos" and "Member"
- In view's loop, display the "photos" posts information

More help:
https://toolset.com/course-lesson/how-to-create-custom-searches-and-relationships-for-users/