Assuming you actually have something in the $gallery object (hint: confirm that by print_r($gallery)
in your template), then your code should work. Perhaps step back and leave the database stuff to NextGEN, just count the image IDs:
global $nggdb;
$poze = get_field('poze');
if ($poze && count($poze)) {
$galleryID = $poze[0]['ngg_id'];
$imageIDs = $nggdb->get_ids_from_gallery($galleryID);
$count = count($imageIDs);
}
Related Posts:
- Integrating Nextgen Gallery with Gallerific
- How to show only images with a certain tag with NextGEN gallery plugin?
- How to create additional thumbnails of custom size in nextgen gallery while uploading images? [closed]
- NextGen Gallery different thumbnail size per gallery
- Theme localization in WPML – .mo file error [closed]
- Open NextGen gallery in same page?
- NextGEN Gallery preview / Show specific images [closed]
- Pass number of images as parameter to NextGen Gallery
- Can I open a Nextgen gallery into a lightbox from an album listing page
- How to disable pagination on a gallery template?
- Nginx config for NGG / NextGen Gallery [closed]
- Prevent plugins loading on all pages (Next-gen Gallery)
- NextGen stylesheets looking for localhost [closed]
- NextGen Plugin: on finding images tags [closed]
- How do I create a NextGen slideshow to show all photos?
- nextgen gallery – filenames’ character encoding issue
- Nextgen gallery show thickbox/shutter from link instead of image [closed]
- NextGen Gallery + GalleryView by John Brien Plugins
- problem with plugins installation (quite beginner)
- multisite not displaying thumbnail image after upload in nextgen gallery
- Present NextGen Gallery album through link [closed]
- NextGEN Gallery – set lightbox image size
- How to increase the thumnail size of nggallery carousel template
- next gen gallery thumbnail problem
- NextGEN Gallery styles don’t work [closed]
- NextGen Gallery quality, down-sizing and speed issues [closed]
- Advanced Custom Fields, WordPress, Javascript Tabbed Content
- Unable to check if plugin is active
- How to store ACF custom fields data in a custom table
- Edit Imported advanced Custom Fields from wordpress Dashboard
- ACF for audio url in wordpress audio shortcode
- Using Advanced Custom Field (ACF) to insert meta description on each page
- How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
- Change message given when deleting post from custom post type
- Building an Advanced Search (text, tags, category, custom fields) – Getting the wrong SQL query
- Using Gutenberg parse_blocks Function With ACF Custom Blocks?
- Query Custom Post Types by date (custom field) range
- Operations with custom fields values in a loop
- Custom Post type and Custom Field WP_Query
- Display multiple custom post types and sort them chronological by one of their fields
- Displaying NextGen Gallery using value from meta not working
- list/consult Taxonomy only for the respective author/creator in dashbboard
- ACF: How to get the full field name (meta_key) by a field key?
- How do I run through a WordPress loop called from a filter function?
- How to get custom fields in a post when published
- How can I make this Advanced Custom Field Save & Store local json work?
- WordPress get_template_part() function not working
- Get all fields inlcuding “ACF” (Advanced Custom Fields) columns in wp_query
- Custom function making troubles in get_permalink for ACF relationship fields
- ACF Relationship – Limit to specific pages
- how to load random related posts with specific custom fields?
- JSON – Create rest api endpoint for Advanced Custom Fields
- How can I count ACF sub_field with a certain value
- Custom query filter by ACF date custom field
- Group by custom field value (start and end times)
- Advanced Custom Fields [closed]
- How to acquire an ACF image using get_previous_post and get_next_post
- How to enlarge thumbnail on mouseover?
- Fetch data from two custom post types and create multidimensional array for output to html table
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- How can I apply an ACF field to a single custom post if it refers to the taxomy of that post type in the rules?
- ACF field group not showing in page
- Getting “Years Only ” from ACF Date Picker field to Hidden filed in the fields group
- Need to check if user has completed a woo commerce payment
- Get title color from category custom field
- Query filter by value in meta_value array
- WP Cron Working, but Function Not Working
- Expire post to draft by date-picker custom field
- ACF group field disappeared after deployment using deployer script
- Why Custom fields description is not working WordPress Version 5.4.2?
- Auto generate excerpt from ACF field on a CPT that does not support excerpt or content
- Modification of RSS feed is not consistent
- Advanced Custom Forms PHP formatting for do_shortcode
- ACF Gallery field images donwload
- ACF under category name in shop page [closed]
- How to use WP Backery on Wysiwyg ACF
- Weird custom fields data lost
- Looking for a javascript callback action to re-initiate a custom slideshow in gutenberg
- ACF background-color per post in a WordPress loop
- Add column and acf field content for cpt
- Automatically convert standard posts with custom fields to custom post types
- Submit and edit font end custom post type
- Output Custom Field value to shortcode
- display Flexible Fields from options
- Save something to global var in add_filter
- How to filter post using custom feild value in shortest and longest duration?
- Customize TinyMCE Buttons
- Get custom field from other post in carousel
- Migrated from localhost to server and cannot get custom_fields content anymore
- Advenced custom fields auto fill problem
- ACF + WPML: How to translate date fields?
- Using ACF custom field for custom post type to order categories
- WordPress Loop trouble with ACF [closed]
- PHP calls to custom fields not being made. Query seems to be blocking them
- Why custom search engine only searches in post titles of custom posts?
- Post object GUID adding http:/
- Parsing value from Lottie JSON file
- How do I add an ACF shortcode to a non-ACF page?
- Convert acf/gutenberg markup to html
- $attributes not defined in block.json PHP template for ACF blocks