ACF Like Button
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. 📹
Installation & Setup
Requirements
A WordPress site with:
Changelog
June 7, 2024
- Add
aria-pressed
to notify screen readers of current Like button state.