For the complete documentation index, see llms.txt. This page is also available as Markdown.

Image Slider field

The Image Slider field type

The Image Slider field stores exactly two images — a left and a right image — and renders them on the front end as a draggable before/after comparison slider.

The Image Slider field: Left/Right image slots in the meta box, and the resulting comparison slider.

At the data level it's stored the same way as the Gallery field — an array of attachment URLs — but with exactly two elements: index 0 is the left image, index 1 is the right image.

Adding images

Click Upload under Left image and Right image to open the WordPress media manager and choose one image for each slot.

Displaying the slider

Use the standard ACPT display functions or shortcodes. The field returns an array of image URLs.

Shortcode

PHP

Accessing a single image by index

In page-builder integrations that support index-based access (e.g. Bricks Builder), you can target a specific image:

The index is zero-based.

The Image Slider field is also supported in Gutenberg (Basic fields block), Elementor, Bricks Builder, and Divi dynamic tags. Refer to the relevant integration page for builder-specific usage.

Last updated