Final demo site ACFLikeButton.WPEnginePowered.com
This repo contains the source code for a WordPress plugin, which does several things:
- Registers two post types: movie, song
- Register ACF Relationship field type and associates it with each user.
- Includes some CSS and a few other things to allow for a custom login/register screen.
- Registers two custom blocks: Like Button and Like Count. These blocks integrate the Interactivity API. When a user clicks the Like Button then it alters the state of the Like Count. Each like is associated with meta information with the user. A user can visit their profile to see a list of all their liked items and edit them as well.
๐น Check out the playback recording from the ACF Chat Friday on YouTube to see the foundation for how this was built. ๐น
A WordPress site with:
- ACF PRO plugin installed and activated.
- Current repo's ACF Like plugin, which relies on the ACF PRO plugin being active.
- Current repo's Interact theme installed and activated.
- Add
aria-pressed
to notify screen readers of current Like button state.