WP SITES

3087 Coded Tutorials & 293 Plugins

Add Button & Image Attributes to WP Gallery Block

The code in this download folder adds a button and image attributes to your block gallery images in WordPress. The code :

Update : You can now use this new plugin named Image Likes & Favorites for WordPress without the need for any 3rd party plugins.

  • Adds a button for like, favorite, wishlist, love with or without total count on the left.
  • Adds the image title else caption else description else the filename without the file extension inline with the button.

Demo Video

Shows the image title display inline with the button else the image caption else the image description.

Works in any WordPress theme. Tested using the Twenty Twenty default theme for WordPress.

Installation

There’s 4 steps :

  1. Copy and paste the PHP code to your child themes functions file.
  2. Upload the file named gallery.js & button-title.js to your child theme folder.
  3. Copy and paste the CSS to the end of your child themes style.css file and clear caching.
  4. Install the favorites for WordPress plugin by Kyle Phillips and configure the settings to apply to media. Go to Favorites Settings > Display and Post Types > Enabled Favorites for : Media

Download Folder

Related Tutorials

Leave a Reply

New Plugins