I’ve set a button group up on ACF with two values: follow | unfollow
I’ve also set it to show under categories only, this way I can query a post, check its category and only display if the category is followed.
How can I display this button group on the frontend? Preferably with ajax, so that when a user is viewing a category, they can either follow or unfollow.
doing something like this would be more complicated than adding a field to the category. When saved the value would be saved to the category and not indicated what user is following.
This is not something that can’t really be done with ACF. You need to record information based on the user, probably in user meta, that stores a list of categories they are following and then query based on the value stored for the current user.
You could potentially use an ACF Taxonomy field on the user admin page and then use AJAX to store values to the current users page.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users