Skip Navigation

[Resolved] What is the best approach to bookmark a post?

This support ticket is created 2 years, 8 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#2154441

I am creating a job board using a toolset and I have a job application post type that is submitted by the job seeker and reviewed by the employer. I want to allow the employer to mark some job applications as favorites so that they can view them later.

How do you recommend I approach this? I was wondering if I create a custom user field that contains a JSON with POST ID and POST TYPE that the user has marked as favorites. The fields would be updated by using a CRED POST form as a star button and use the cred_save_data hook to update data in user_meta. This was I would keep info per user and can use it to show the right posts on the favorite tab.

Does that make sense or is there a native way on Toolset to do this?

Thoughts?

#2154787

Hello, since Toolset's post relationships only work between posts, and not between Users and posts, one other solution is to use a proxy post type for Users and apply post relationships to the proxy post type. That process is explained a bit in our documentation here: https://toolset.com/course-lesson/how-to-create-custom-searches-and-relationships-for-users/

Otherwise, the solution you discussed seems viable, though it would not be simple to filter by JSON in a custom User field using built-in Views filtering options.

#2154919

Chris,

Thanks for this and both methods seem viable but I am concerned about how it looks on the front-end. Hear me out -

In my experience, when I have bookmarked things on other sites - it happens instantaneously. The star color changes from transparent to yellow on click at once.

However, if I am going to use a CRED form to create a bookmark entry - it takes some time to process this request -- even when I have AJAX enabled ... the spinner spins for some time before being done. It seems like overkill to me for bookmarking something.

How do these other companies do it so fast?

To be clear, I am thinking of using a CRED form with just a submit button linked to the post type so that it allows me to use the cred_save_data hook to insert data.

Bookmarking should feel effortless to users... not like a big request. Also, what do I do when bookmarking is done? I want the user to stay on the same page but reprocessing the whole page seems too much - hidden link

Any ideas?

#2155311

There's not really a simple way to speed up CRED's processes to make the submission happen faster, so it might be worthwhile to investigate a third-party plugin that handles favoriting specifically. There may be a more performant system for handling this kind of process with AJAX.

#2156305

Thanks, Chris. My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.