ACF Photo Gallery Field

Wordpress Plugin
Download latest - 1.8.0

Developers

navzme

Download Stats

Today
Yesterday
Last Week
All Time
Banner 772x250

A lightweight extension of Advanced Custom Field (ACF) that adds Photo Gallery field to any post/pages on your WordPress website.

  • Visually create your Fields
  • Add multiple photos and you can also modify title, caption and link to anything
  • Assign your fields to multiple edit pages (via custom location rules)
  • Easily load data through a simple and friendly API
  • Uses the native WordPress custom post type for ease of use and fast processing
  • Uses the native WordPress metadata for ease of use and fast processing

Note

This plugin is alternative of ACF Gallery Pro. You need to have knowledge of coding because youll be required to edit your WordPress theme source code. If you are looking for shortcodes and prebuilt gallery then this plugin is NOT for you. This plugin will give you PHP array of images and youll need to make the gallery layout as you wish.

Usage

acf_photo_gallery is a helper function that takes in ACF_FIELD_NAME and POST_ID will query the database and compile the images for you. The output of this function will be an array.

acf_photo_gallery(ACF_FIELD_NAME, POST_ID);

Example

The following example is using Twitter Bootstrap framework to layout. You can use any framework of your choice.

`<?php //Get the images ids from the post_metadata $images = acf_photo_gallery('vacation_photos', $post->ID); //Check if return array has anything in it if( count($images) ): //Cool, we got some data so now let's loop over it foreach($images as $image): $id = $image['id']; // The attachment id of the media $title = $image['title']; //The title $caption= $image['caption']; //The caption $full_image_url= $image['full_image_url']; //Full size image url $full_image_url = acf_photo_gallery_resize_image($full_image_url, 262, 160); //Resized size to 262px width by 160px height image url $thumbnail_image_url= $image['thumbnail_image_url']; //Get the thumbnail size image url 150px by 150px $url= $image['url']; //Goto any link when clicked $target= $image['target']; //Open normal or new tab $alt = get_field('photo_gallery_alt', $id); //Get the alt which is a extra field (See below how to add extra fields) $class = get_field('photo_gallery_class', $id); //Get the class which is a extra field (See below how to add extra fields) ?>

<?php if( !empty($url) ){ ?>

Releases (14 )

Version Release Date Change Log
1.8.0 2022-11-02
1.7.9 2022-04-02
1.7.8 2021-12-22
1.7.7 2021-12-18
1.7.1 2021-12-18
1.7.6 2021-12-17
1.6.9 2021-05-15
1.6.8 2020-04-12
1.6.7 2020-04-06
1.6.6 2020-04-05
1.6.5 2019-11-06
1.6.4 2019-03-02
1.6.3 2018-09-14
1.6.2 2018-05-27