Title: ACF Photo Gallery Field
Author: Navneil Naicker
Published: <strong>2. Juli 2016</strong>
Last modified: 26. Dezember 2025

---

Plugins suchen

![](https://ps.w.org/navz-photo-gallery/assets/banner-772x250.png?rev=2607741)

![](https://ps.w.org/navz-photo-gallery/assets/icon-128x128.png?rev=2607741)

# ACF Photo Gallery Field

 Von [Navneil Naicker](https://profiles.wordpress.org/navzme/)

[Herunterladen](https://downloads.wordpress.org/plugin/navz-photo-gallery.3.1.zip)

 * [Details](https://de.wordpress.org/plugins/navz-photo-gallery/#description)
 * [Rezensionen](https://de.wordpress.org/plugins/navz-photo-gallery/#reviews)
 *  [Installation](https://de.wordpress.org/plugins/navz-photo-gallery/#installation)
 * [Entwicklung](https://de.wordpress.org/plugins/navz-photo-gallery/#developers)

 [Support](https://wordpress.org/support/plugin/navz-photo-gallery/)

## Beschreibung

**Wichtiger Hinweis für neue Benutzer des ACF-Fotogalerie-Feldes**

Wenn du das ACF Photo Gallery Feld zum ersten Mal auf deiner WordPress-Website installierst,
möchten wir dich darauf hinweisen, dass dieses Plugin ab Oktober 2024 nicht mehr
weiterentwickelt wird. Als Alternative haben wir ein neues und verbessertes Plugin
namens [ACF Galerie 4](https://wordpress.org/plugins/acf-galerie-4/) veröffentlicht.

Wir empfehlen, sich [ACF Galerie 4](https://wordpress.org/plugins/acf-galerie-4/)
anzusehen, um von erweiterten Funktionen und kontinuierlichem Support zu profitieren.
ACF Galerie 4 enthält ein integriertes Migrationstool, das Daten aus ACF Photo Gallery
Field oder ACF Gallery Pro nahtlos in ACF Galerie 4 überträgt. [Erfahre mehr](https://wordpress.org/support/topic/migrate-from-acf-photo-gallery-field-to-acf-galerie-4/).

Danke

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
 * Unterstützung für WordPress Classic und Gutenberg Editor
 * RESTFul API

#### Spenden

Navneil Naicker is the sole developer working on this free WordPress Plugin in his
leisure time. He would like to integrate it with premium plugins like Elementor 
Pro and Advanced Custom Fields Pro. Please donate to support Navneil in continuing
further development of this plugin. Click on the link “[https://www.buymeacoffee.com/navzme](https://www.buymeacoffee.com/navzme)”
to donate.

#### Verwendung

_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);
    ```

#### Beispiel

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)
    ?>
    <div class="col-xs-6 col-md-3">
        <div class="thumbnail">
            <?php if( !empty($url) ){ ?><a href="<?php echo $url; ?>" <?php echo ($target == 'true' )? 'target="_blank"': ''; ?>><?php } ?>
                <img src="<?php echo $full_image_url; ?>" alt="<?php echo $title; ?>" title="<?php echo $title; ?>">
            <?php if( !empty($url) ){ ?></a><?php } ?>
        </div>
    </div>
    <?php endforeach; endif; ?>
    ```

#### Add Extra Fields

Um zusätzliche Felder hinzuzufügen, füge folgendes zur Datei functions.php deines
Themes hinzu.

    ```
    //Create extra fields called Altnative Text and Status
    function my_extra_gallery_fields( $args, $attachment_id, $acf_key ){
        $args['alt'] = array(
            'type' => 'text', 
            'label' => 'Altnative Text', 
            'name' => 'alt', 
            'value' => get_field($field . '_alt', $attachment_id)
        );
        $args['status'] = array(
            'type' => 'select', 
            'label' => 'Status', 
            'name' => 'status', 
            'value' => array(
                array(
                    '1' => 'Active',
                     '2' => 'Inactive'
                ), 
                get_field($field . '_status', $attachment_id)
            )
        );
        return $args;
    }
    add_filter( 'acf_photo_gallery_image_fields', 'my_extra_gallery_fields', 10, 3 );
    ```

Supported field types:
 * text, date, color, datetime-local, email, number, tel,
time, url, week, range, checkbox, radio, textarea, select

#### How to get values of extra fields

You can use ACF helper function `get_field`

    ```
    get_field('photo_gallery_alt', $id);
    get_field('photo_gallery_class', $id);
    ```

#### Pull caption from attachment caption field

By default the caption is being pulled from description field. Add the following
filter to your `function.php` to pull the caption from attachment caption field.

    ```
    add_filter( 'acf_photo_gallery_caption_from_attachment', '__return_true' );
    ```

#### REST API

Send HTTP Request to URL to get JSON response of all posts

    ```
    http://{domain}/wp-json/wp/v2/{POST_TYPE}/
    ```

Send HTTP Request to URL to get JSON response of specific post

    ```
    http://{domain}/wp-json/wp/v2/{POST_TYPE}/{POST_ID}/
    ```

When you receive the response, see the ACF item which contains ACF photo gallery
name and array of images.

#### Installation and basic usage tutorial

#### ACF-Fotogalerie-Feld in WordPress – Tutorial zu benutzerdefinierten Beitragstypen

#### How to use Elementor dynamic tags with ACF Photo Gallery Field plugin tutorial

#### Kompatibilität

Dieser ACF-Feldtyp ist kompatibel mit: ACF 4, 5 und 6

#### Issues

Just like any other WordPress plugin, this plugin can also cause issues with other
themes and plugins. If you are facing issues making this plugin work on your WordPress
site, please do ask for help in the support forum. This way we can help you out 
and prevent this issue from happening to someone else. If you want to talk to me
directly, you can contact me via my website [http://www.navz.me/](http://www.navz.me/)

## Installation

**Wichtiger Hinweis für neue Benutzer des ACF-Fotogalerie-Feldes**

Wenn du das ACF Photo Gallery Feld zum ersten Mal auf deiner WordPress-Website installierst,
möchten wir dich darauf hinweisen, dass dieses Plugin ab Oktober 2024 nicht mehr
weiterentwickelt wird. Als Alternative haben wir ein neues und verbessertes Plugin
namens [ACF Galerie 4](https://wordpress.org/plugins/acf-galerie-4/) veröffentlicht.

Wir empfehlen, sich [ACF Galerie 4](https://wordpress.org/plugins/acf-galerie-4/)
anzusehen, um von erweiterten Funktionen und kontinuierlichem Support zu profitieren.

Danke

Von deinem WordPress-Dashboard aus

 1. **Visit** Plugins > Add New
 2. **Search** for „ACF Photo Gallery Field“
 3. **Install and Activate** ACF Photo Gallery Field from your Plugins page
 4. **Sieh dir das Tutorial an**, um [loszulegen](https://www.youtube.com/watch?v=c7u9FwVLe9Q).

## Rezensionen

![](https://secure.gravatar.com/avatar/27d4c967d4873a283be487661a067aae4aaacec66e8f3af5237139265d273f8d?
s=60&d=retro&r=g)

### 󠀁[Excelent free option for ACF photo gallery field](https://wordpress.org/support/topic/excelent-free-option-for-acf-photo-gallery-field/)󠁿

 [tazmandev](https://profiles.wordpress.org/tazmandev/) 27. Dezember 2025

I have been using ACF Photo Gallery Field for about 4 years now, and it worked excelent.
I use it with Elementor Pro and custom templates, and I am able to access the dinamic
data in the gallery fields just like with ACF Pro. Many thanks to the builder for
this excelent plugin!

![](https://secure.gravatar.com/avatar/d31677ddaf319a1dbcaa0fb3a12cf8c7d463bc82878c61265777fec43bd23a1c?
s=60&d=retro&r=g)

### 󠀁[Too buggy](https://wordpress.org/support/topic/too-buggy-13/)󠁿

 [qbey](https://profiles.wordpress.org/qbey/) 13. Mai 2024 4 Antworten

Does not work inside ACF fields groups. Simply does not saving any selected images.
Also, if a lot images was added, sometimes spontaneously losing all of them when
saving the post. Updated 05.13.2024. Changed rating to 1 star. Details below.

![](https://secure.gravatar.com/avatar/e1f174654f7df771882da0f27caf4269b04624a0fdad34a36f697f2fde9da0ba?
s=60&d=retro&r=g)

### 󠀁[Great solution! It works perfectly! thanks Devs!](https://wordpress.org/support/topic/great-solution-254/)󠁿

 [pedrocunhaweb](https://profiles.wordpress.org/pedrocunhaweb/) 13. August 2023

It works perfectly! thanks Devs!

![](https://secure.gravatar.com/avatar/b267b7cde82b995abb0a51932454c88d9a80b7d98ea8d3943d04a39220eab7fd?
s=60&d=retro&r=g)

### 󠀁[PHP Fatal error](https://wordpress.org/support/topic/php-fatal-error-378/)󠁿

 [Zohaib Ali](https://profiles.wordpress.org/zohaibalimemonx/) 27. Juli 2023

It gives Fatal Error!

![](https://secure.gravatar.com/avatar/e9c0c7297677236fbb4214b54c04e163af8142ffaab9464517d168a8e65b1f54?
s=60&d=retro&r=g)

### 󠀁[excellent](https://wordpress.org/support/topic/excellent-12340/)󠁿

 [pmachart](https://profiles.wordpress.org/pmachart/) 26. November 2022

excellent plugin does just what it says it does. check out my quick and dirty shortcode
implementation for it on wpcodebin .com/code/443bp5

![](https://secure.gravatar.com/avatar/e3c984706fe50fcaddba51e73c3b417c2aae60138257054ecb5bfb95f5a50769?
s=60&d=retro&r=g)

### 󠀁[Works perfectly with Elementor](https://wordpress.org/support/topic/works-perfectly-with-elementor/)󠁿

 [joexcm](https://profiles.wordpress.org/joexcm/) 21. August 2022

Not sure what other people are doing but this worked perfectly for me going into
the Elementor image carousel widget. Thanks to the developer

 [ Alle 29 Rezensionen lesen ](https://wordpress.org/support/plugin/navz-photo-gallery/reviews/)

## Mitwirkende und Entwickler

„ACF Photo Gallery Field“ ist Open-Source-Software. Folgende Menschen haben an diesem
Plugin mitgewirkt:

Mitwirkende

 *   [ Navneil Naicker ](https://profiles.wordpress.org/navzme/)

„ACF Photo Gallery Field“ wurde in 2 Sprachen übersetzt. Danke an [die Übersetzer](https://translate.wordpress.org/projects/wp-plugins/navz-photo-gallery/contributors)
für ihre Mitwirkung.

[Übersetze „ACF Photo Gallery Field“ in deine Sprache.](https://translate.wordpress.org/projects/wp-plugins/navz-photo-gallery)

### Interessiert an der Entwicklung?

[Durchstöbere den Code](https://plugins.trac.wordpress.org/browser/navz-photo-gallery/),
sieh dir das [SVN-Repository](https://plugins.svn.wordpress.org/navz-photo-gallery/)
an oder abonniere das [Entwicklungsprotokoll](https://plugins.trac.wordpress.org/log/navz-photo-gallery/)
per [RSS](https://plugins.trac.wordpress.org/log/navz-photo-gallery/?limit=100&mode=stop_on_copy&format=rss).

## Änderungsprotokoll

=3.1=
 * [Fixed] WordPress security fix and plugin check fix.

=3.0=
 * [Fixed] URL and target not saving into the database.

=2.9=
 * [Fixed] On image edit, popup modal not accessible on Gutenberg editor.

=2.8=
 * [Fixed] Undefined array key „nonce“.

=2.7=
 * [Fixed] Tidy up few things.

=2.6=
 * [Fixed] When click on „Add Images“, WordPress media library not opening.

=2.5=
 * [Fixed] Elementor dynamic tag offset index * [Added] fallback for Elementor
dynamic tag for versions prior to 3.16

=2.4=
 * [Fixed] Undefined array key „option“ error

=2.3=
 * [Fixed] renamed a function to avoid conflict.

=2.2=
 * [Fixed] Elementor Pro dynamic tag fix. Thanks to GitHub @rloes for the 
fix. * [Added] Donation request popup. People gonna hate me for this. Sorry.

=2.1=
 * [Fixed] explode(): Passing null to parameter error * [Fixed] /wp-json/ 
not showing gallery images on custom post type. Thanks to GitHub @nykula for the
fix.

=2.0=
 * [Removed] Removed functionality from profile * [Removed] errors and deprecating
warnings

=1.9=
 * [Added] Donation link because I’m poor * [Removed] errors and deprecating
warnings

=1.8.1=
 * [Updated] Renamed function from ‚my_profile_update‘ to ‚apg_profile_update‘*[
Bugfix] Backdrop not going away when the „Native“ model is closed * [Removed] SweetAlert
and added native browser alert

=1.8.0=
 * [Added] Support for ACF 6

=1.7.9=
 * [Bugfix] Elementor Pro gallery images preview * [Added] Support for user
profile

=1.7.8=
 * [Bugfix] Sanitizing and escaping inputs

=1.7.7=
 * [Bugfix] Sanitizing and escaping inputs

=1.7.6=
 * [Bugfix] Sanitizing and escaping inputs

=1.7.5=
 * [Bugfix] Security issue and reset body overflow

=1.7.4=
 * [Bugfix] Security issue

=1.7.3=
 * [Bugfix] Remove edit and delete image button conditions

=1.7.2=
 * [Bugfix] Illegal string offset error

=1.7.1=
 * [Bugfix] ElementorPro class not found * [Bugfix] Warning: Undefined array
key „acf-photo-gallery-field“

=1.7.0=
 * [Add] Option for to show/hide edit and remove button * [Add] Support 
for Elementor

=1.6.8=
 * [Bugfix] Make gallery images limit optional

=1.6.7=
 * [Removed] Support to ACF get_field() function due to bug

=1.6.6=
 * [Add] Added support to ACF get_field() function * [Add] Added more fields
types to extra fields * [Add] Added in SweetAlert and images limit options * [Add]
Added message that ACF Photo Gallery isn’t supported on taxonomy

=1.6.5=
 * [Bugfix] Remove not empty condition from checkbox item on edit * [Remove]
Remove support for ACF to REST API plugin * [Add] Native support for REST API

=1.6.4=
 * [Bugfix] JavaScript error in the console when removing images from the
WordPress metabox

=1.6.3=
 * [Added] Support for ACF 5 * [Added] Edit gallery with built-in or WordPress
native model. Thanks to Github @makepost * [Added] Under the hood improvements of
the codebase * [Added] Support for RESTFul API with ACF to REST API plugin

=1.6.2=
 * [Bugfix] Keep data synced with the attachment data * [Bugfix] Pull caption
attachment caption using add filters * [Bugfix] PHP 7.2 count() error

=1.6.1=
 * [Bugfix] Edit image box disappears on click of pencil edit button reported
by @rickytoof9

=1.6.0=
 * [Bugfix] Error on saving post with empty gallery. Patch provided by @
ugy * [Bugfix] Showing multiple photo gallery fields in the same page reported by@
rickytoof9 * [Added] Support for srcset. Special thanks to @ugy for the code

#### 1.5.0

 * [Added] Support for SVG
 * [Added] Support for legacy PHP version
 * [Added] Add extra fields

#### 1.4.0

 * [Added] Can sortable gallery images
 * [Bugfix] Fixed the order to follow the sort order for gallery images

#### 1.3.0

 * Change the meta_key from acf field_key to acf field_name
 * [Added] Helper function acf_photo_gallery() to pull images
 * [Added] Helper function acf_photo_gallery_resize_image to resize the image on
   fly and save it
 * [Bugfix] Issue with target parameter in config
 * [Bugfix] Issue with url not saving properly

#### 1.2.0

 * [Bugfix] Support for WordPress 4.6
 * [Added] Some changes on on the display
 * [Added] Fetch the data from the database

#### 1.1.0

 * [Bugfix] Undefined index: acf-photo-gallery-field on file acf-photo_gallery-v4
 * [Bugfix] When delete the photos from the gallery, the last photo was not deleting
 * [Bugfix] Gallery photos was not saving in the database

#### 1.0.0

 * Initial Release.

## Meta

 *  Version **3.1**
 *  Zuletzt aktualisiert **vor 10 Monaten**
 *  Aktive Installationen **60.000+**
 *  WordPress-Version ** 5.8 oder höher **
 *  Getestet bis **6.9.10**
 *  PHP-Version ** 7.0 oder höher **
 *  Sprachen
 * [Danish](https://da.wordpress.org/plugins/navz-photo-gallery/), [English (US)](https://wordpress.org/plugins/navz-photo-gallery/)
   und [German](https://de.wordpress.org/plugins/navz-photo-gallery/).
 *  [Übersetze in deine Sprache](https://translate.wordpress.org/projects/wp-plugins/navz-photo-gallery)
 * Schlagwörter
 * [acf](https://de.wordpress.org/plugins/tags/acf/)[custom](https://de.wordpress.org/plugins/tags/custom/)
   [fields](https://de.wordpress.org/plugins/tags/fields/)[gallery](https://de.wordpress.org/plugins/tags/gallery/)
   [photo](https://de.wordpress.org/plugins/tags/photo/)
 *  [Erweiterte Ansicht](https://de.wordpress.org/plugins/navz-photo-gallery/advanced/)

## Bewertungen

 4 von 5 Sternen.

 *  [  20 5-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/navz-photo-gallery/reviews/?filter=5)
 *  [  1 4-Sterne-Rezension     ](https://wordpress.org/support/plugin/navz-photo-gallery/reviews/?filter=4)
 *  [  1 3-Sterne-Rezension     ](https://wordpress.org/support/plugin/navz-photo-gallery/reviews/?filter=3)
 *  [  1 2-Sterne-Rezension     ](https://wordpress.org/support/plugin/navz-photo-gallery/reviews/?filter=2)
 *  [  6 1-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/navz-photo-gallery/reviews/?filter=1)

[Deine Rezension](https://wordpress.org/support/plugin/navz-photo-gallery/reviews/#new-post)

[Alle Rezensionen anzeigen](https://wordpress.org/support/plugin/navz-photo-gallery/reviews/)

## Mitwirkende

 *   [ Navneil Naicker ](https://profiles.wordpress.org/navzme/)

## Support

Behobene Probleme in den letzten zwei Monaten:

     0 von 1

 [Support-Forum anzeigen](https://wordpress.org/support/plugin/navz-photo-gallery/)

## Spenden

Möchtest du die Weiterentwicklung dieses Plugins unterstützen?

 [ Für dieses Plugin spenden ](https://www.buymeacoffee.com/navzme)