This code adds a favorite button to gallery & attachment page images in the Twenty Twenty default theme for WordPress.
The code adds the favorites button to :
- All galleries you create using the native WordPress gallery.
- All attachment page gallery images which display the individual images in the gallery.
Works in any WordPress theme.
Features
This system :
- Allows users to subscribe and create their own username & password which gives them access to their own dashboard.
- Enables you to create unlimited photo galleries in grid format with any number of columns and size of image.
- Enables users to quickly browse thumbnail images which once clicked, open a larger image on a separate page with the ability to add captions, image descriptions and photo credits.
- Enables users to favorite, like or love individual photos. Each gallery includes a comment form where users can submit questions and feedback about specific photos or entire galleries of images.
- Includes analytics showing how many times each photo has been liked, loved or favorited.
Installation
There’s 4 steps :
Step 1 – Install the Favorites plugin and configure the settings as seen in this image.
Step 2 – Copy & paste the PHP code from the functions.php file to your child themes functions file or custom functionality plugin.
Step 3 – Upload the attachment.php template file and templates-parts folder to your child theme folder.
Step 4 – Copy & paste the CSS to the end of your stylesheet and remember to clear caching.
You must be logged in to post a comment.