ACF Photo Gallery Field
Important Notice for New Users of ACF Photo Gallery Field If you are installing the ACF Photo Gallery Field for the first time on your WordPress website, we’d like to inform you that this plugin will no longer be maintained as of October 2024. As an alternative, we have launched a new and improved plugin called ACF Galerie 4. We encourage you to check out ACF Galerie 4 for enhanced features and ongoing support. ACF Galerie 4 includes a built-in migration tool that seamlessly transfers data from ACF Photo Gallery Field or ACF Gallery Pro to ACF Galerie 4. Learn more. Thanks 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 Supports WordPress classic and Gutenberg editor RESTFul API Donation 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” to donate. 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. 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) ?> " > " alt=" " title=" "> Add Extra Fields To add extra fields add the following to your themes functions.php file. //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 Photo Gallery Field on WordPress Custom Post Type tutorial How to use Elementor dynamic tags with ACF Photo Gallery Field plugin tutorial Compatibility This ACF field type is compatible with: ACF 4, 5 and 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/
Top keywords
- field25×3.02%
- acf22×2.65%
- gallery19×2.29%
- image19×2.29%
- id13×1.57%
- photo12×1.45%
- photo gallery12×1.45%
- url11×1.33%
- extra10×1.21%
- fields10×1.21%
- acf photo9×1.09%
- acf photo gallery9×1.09%
Responsive Lightbox & Gallery
Everything You Need in a WordPress Gallery Plugin Responsive Lightbox and Gallery plugin is a fully fledged WordPress gallery plugin with a powerful Drag & Drop Gallery Builder and Lightbox functionality that’s used daily by more than 100,000 active users and downloaded over 3 Million times. The beauty of it is how easy it is for you to customize it and enhance its features thanks to free and premium extensions. Why You Should Use Responsive Lightbox and Gallery Plugin Easiest Gallery Builder Say goodbye to coding. With the built-in drag and drop Gallery builder, you will be able to create beautiful galleries, customize them, and add your preferred styles in minutes. Vast Customization Options Responsive Lightbox and Gallery plugin is packed with customization options per each gallery and lightbox style so you can tweak them to suit your website’s audience with just a few clicks. SEO-Friendly and Lightweight Responsive Lightbox and Gallery plugin is built keeping SEO and performance in mind, making it lightweight and fast when it comes to page load. Premium Extensions Looking to provide a premium experience to your visitors? Responsive Lightbox and Gallery plugin offers plenty of premium extensions to provide you with even more flexibility and customization options. Need more reasons? Check them out here! What some of our 100,000+ active users say about Responsive Lightbox and Gallery plugin Amazing Gallery plugin! Versatile and powerful for both sliders and galleries, many features and style options. Really easy to use. Takes all the fiddling out of the process of creating a responsive gallery/lightbox. I needed a lightbox plugin that works reliably. This marvelous plugin does the magic. Now I can spend more on my photography and less time customizing WordPress. This plugin is quite flexible and effective. The functionality choices are broad and all quite easy to configure. Need more galley options? Responsive Lightbox and Gallery plugin can be extended with our premium extensions: Premium Extensions: * Photo & Art bundle * Justified Gallery * Expander Gallery * Hidden Gallery * Masonry Image Gallery * Slider Gallery * Lightcase Lightbox * PhotoSwipe Lightbox * Lightgallery Lightbox * Strip Lightbox * Fancybox Pro * Lightbox Comments Full Feature List Powerful and easy-to-use gallery builder 3 beautiful gallery templates – Grid, Slider and Masonry 8 responsive lightbox scripts (SwipeBox, prettyPhoto, Nivo Lightbox, Image Lightbox, Tos “R” Us, Featherlight, Magnific Popup, GLightbox) Create galleries from Media Library or Post attached images Media Folders with a drag & drop interface Access to millions of images through Remote Library Option to import remote images to Media Library Gutenberg editor compatibility Iframe, Ajax, HTML5 and Inline lightbox content support Advanced pagination, incl. AJAX and infinite scroll Automatically add lightbox to WordPress image galleries Automatically add lightbox to WordPress image links Automatically add lightbox to WordPress video links (YouTube, Vimeo) Automatically add lightbox to widgets content Automatically add lightbox to WordPress comments content WooCommerce product gallery support Popular Page builders compatibility Gallery widget Single image widget Option to display single post images as a gallery Option to modify native WP gallery links image size Option to set gallery images title from image title, caption, alt or description Option to force lightbox for custom WP gallery replacements like Jetpack tiled galleries Option to trigger lightbox on custom jquery events Option to conditionally load scripts and styles only on pages that have images or galleries in post content Highly customizable settings for each of the lightbox scripts Highly customizable settings for each gallery Multisite support .pot file for translations included