Creating a slider in Flatsome is simple and easy to update, compatible with various devices using ACF Pro. This involves creating a Field Group named Slider, with specific locations selected. Within this Field Group, 2 Repeater Fields are created for desktop-tablet and mobile versions. Each Field includes Sub Fields for image and link. Finally, PHP code is used to call and display these fields in the chosen template. This process allows for customization and flexibility in creating sliders for different devices.
Creating a slider in Flatsome is straightforward and easy to update, compatible with various devices using ACF Pro.
1. Create an Image Slider with Two Versions: Desktop – Tablet and Mobile
Step 1: Create a Field Group and name it, for example, Slider. Make sure to select the appropriate Location to call the Field’s information using PHP code in the next step.
Step 2: Create 2 Fields with the Field Type as Repeater corresponding to the Desktop – Tablet and Mobile versions.
- For Desktop – Tablet:
- Image: Field Type is Image and Return Format is Image URL.
- Link: Field Type is Text or URL.
- For Mobile:
- Image: Field Type is Image and Return Format is Image URL.
- Link: Field Type is Text or URL.
Step 3: Code PHP to call the fields and display them. Use the code snippet below and place it in the selected Template from Step 1.
<!--- Home Slider --->
<!--- End Home Slider --->
By following these steps, you can easily create and customize a slider in Flatsome with ACF Pro for a seamless user experience.