Add Like Button To Smart Slider in WordPress

This tutorial shows you how to use PHP and jQuery code to add your own custom like button to slides using Smart Slider 3 in WordPress.

The good thing here is you completely control the like button, not a social media provider so you can customize the button to your own requirements and turn it into any type of button you want.

Works in any WordPress theme.

Features

  1. Button contains a count which is saved in the database and shown on page load as well as updated on button click.
  2. Button styled using 2 CSS rules making for easy modification of colors, changing of icon and text.
  3. Works on both the free and pro versions of Smart Slider.
  4. Adds a unique button on each slide with its own count.
  5. Works with the Smart Slider block and non block themes using the classic editor.

Code Installation

There’s 3 basic steps :

  1. Upload the file named smart.js to your child theme folder.
  2. Copy and paste the PHP code to the end of your child themes functions.php file.
  3. Copy and paste the CSS to the end of your child themes style.css file and clear caching.

Was This Tutorial Helpful?