Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Dynamic tagged image galleries

I don’t use ACF myself, but what you’re essentially needing to do is to be able to add a series of tags to images. There’s a tutorial here that explains how to do it with ACF:
https://www.greengeeks.ca/tutorials/article/add-custom-fields-to-media-wordpress/

You then need to use ACF to add an ‘image tag’ to the artist profiles. Something that you can use to re-unite the artist with their photo.

So lets say for the artist you have 'gallery-tag' = 'alice-dutton'.

Then for the images, as you upload them, you fill out 'artist-tags' = 'alice-dutton'.

Two artists? 'artist-tags' = 'alice-dutton', 'steve-buscemi'

So basically the way page, post, category and tag slugs work.

Once you have that set-up in a manner that works for you, on the actual Artists page, you’d have to run a query for attachements that have an artist-tag that matches the artists gallery-tag.

As a standard WP_Query it would look like this:

$gallery_tag = get_post_meta( $post->ID, 'gallery-tag', true ); //this would get 'alice-dutton'

$gallery_qquery = new WP_Query( array(
    'post_type'         => 'attachement',
    'posts_per_page'    => -1, //gets all of them
    'meta_query'        => array(
        array(
            'key'           => 'artist-tag',
            'value'         => $gallery_tag 
        )
    ),
) );

And then you’d run your output for the $gallery_query.

You’ll have to go through the ACF and Elementor documentation to sort out exactly how to do it – I’ve never built a full project with either and have work with them very, very few times. But from my reading this shouldn’t be a problem.

Related Posts:

  1. Regenerate missing _wp_attachment_metadata
  2. Retrieving an alt tag from a custom field
  3. Get thumbnail url of custom meta image?
  4. Generate images to be associated for tag and category?
  5. Display an icon with get_post_meta?
  6. Remove “%” from strings in serialized arrays in wp_postmeta
  7. Image not showing using a custom function and get_post_meta
  8. How to join Caption AND Description Meta Fields as one combined-caption in Image Block
  9. How to Display Image Caption but Not Alt Text
  10. get_post_meta returning broken path in image src
  11. Adding Image Description below Images Inserted into Posts
  12. get_post_custom: get image URL instead of image ID
  13. Set default image link target in Gutenberg image block
  14. Add an alignment option for images
  15. Is there a hook which fires after all thumbnails are generated?
  16. Auto Add Image Title,Caption,Alt Text,Description while uploading Images in WordPress
  17. How to have different captions for same image, for galleries?
  18. WP 3.5 and Galleries – how to count images?
  19. How to create thumbnails with a fixed width, so all of them will have the same width?
  20. WordPress is Inserting images into Post as HTTP and not HTTPS
  21. Can images be automatically compressed?
  22. Adding custom image size to the media image editor
  23. Display info from custom fields in all images’ HTML
  24. Disabling auto-resizing of uploaded images
  25. How do I delete thousands of unattached images?
  26. Add visual editor to Media Edit Screen
  27. How to remove link from an image in a post?
  28. How to set the width and height rule for featured image
  29. How to install Imagick or resolve issue
  30. Responsive Images Resizing Images
  31. hardcrop images in gutenberg “latest posts” block
  32. Get uploaded image path in wordpress by filename
  33. Gallery post images on homepage?
  34. Use Gravatar as fallback image if no local image is not found
  35. add the post as canonical for attachment page wordpress
  36. How to get image ID to use inside wp_read_image_metadata()?
  37. Add “data-” attribute to image links
  38. How can I make all post image uploads have data-width and data-height attributes automatically by default?
  39. Large size image breaks template layout
  40. Replace original image, WP image editor
  41. WP Responsive images – upload custom image sizes
  42. Images not loading after migration
  43. Disable all resizing and compression
  44. Loose images in uploads folder
  45. Help With Custom Image and Text Widget
  46. Convert uploaded GIF to non animated image automatically
  47. Using SRCSET with Images and Featured Images
  48. How to make a gallery with dynamic images from URLs?
  49. Images uploaded to the media library has strange colors. However, in the edit screen the color is ok
  50. t5-fresh-editor-stylesheets.php breaks image placement in WP Beta 3 editor
  51. Unable to upload images to the Media Library. Getting this erron on the console wp-admin/async-upload.php 403 (Forbidden)
  52. Missing background image setting in admin of twenty nineteen
  53. Using jQuery to automatically add class only to gif images in WordPress database [closed]
  54. Modify RSS – remove image and add text
  55. Retrieve Image Attachments Getting Post Thumbnail Image First
  56. Is there a wordpress filter to edit the markup of inline images?
  57. How can I check if the first block is an image aligned left or right?
  58. Alt text not showing up
  59. How can I change the to for lazyload wp smilies
  60. How to post images on my blog with a pre-defined border
  61. Output posts attached images as thumbnails linked to full-size with lightbox class
  62. Making a parent directory writable by the server
  63. How to add a custom class to all the images for a page only?
  64. my featured image of wordpress are not showing in the front end though image are uploaded in media library
  65. Images getting smashed
  66. Unset image sizes before images are uploaded
  67. Wrap post images with a link, not figure (image_send_to_editor doesn’t work)
  68. An error has occurred during the upload process in wordpress 5.3.2
  69. get_the_post_thumbnail() title and alt attributes not displaying
  70. What is the best way to host a site with many images without it being too slow?
  71. Show featured image in all posts
  72. Jetpack Lazy load images fade in
  73. add alt text to images loaded from json with media_sideload_image
  74. WordPress images programatically display error
  75. Load only imagens resized in custom page
  76. How to see previous –next image option in the theme?
  77. Put image onto header
  78. Getting the Select and Crop Functionality Using Custom Fields
  79. Display images in template file
  80. Need help making my homepage blog image smaller than my post image
  81. After I upload a file to library its name converted to dashes
  82. Image to only show up in the single post page, not on the blog/home page
  83. Changing image size displayed in wordpress twenty fourteen theme
  84. How do I display image files as links?
  85. Only User Upload image Http Error
  86. See the all uploaded images of a user as an admin
  87. Broken Media Library
  88. wp_get_attachment_image_src() does not return what I want
  89. 3.5.x Theme Customize: Handling Custom Control Requests
  90. Wrap a post image with a div if it doesn’t have a caption
  91. WordPress Bootstrap dynamic carousel showing images separately not as carousel
  92. Adding different classes to different images depending on size for fine control of image layout in posts
  93. How to display image ALT under image?
  94. Faster image upload on mobile [closed]
  95. I am having trouble displaying an image at the top of a widget area [closed]
  96. Can’t upload svg files in WordPress
  97. Trying WP editor to load full size image (not ‘300×300’)
  98. How to get rid of a blank space where the featured image used to be?
  99. Upload media file failed. Uploadtest failed
  100. [Solved]: Extend the list view in gutenberg editor?
Categories images Tags images, post-meta
Why WordPress plugin url ajax doesn’t work?
Create subdomain out of sight the wp multisite

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress