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
- WordPress post image change on hover (ACF?)
- Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]
- Where are custom field values stored in the database
- Filtering multiple custom fields with WP REST API 2
- Filter by custom field in custom post type on admin page
- Getting custom taxonomy from custom post type
- Media library – Limit images to custom post type
- WooCommerce shop page to use my custom template [closed]
- Unable to check if plugin is active
- Display all values of custom a field created with ACF on a page
- How to import CSV into Custom Post Type custom fields?
- Filter next_post_link() and previous_post_link() by meta_key?
- ACF – get fields from group
- Order get_terms using a Custom Field
- Display List Of Posts Containing a Relationship Field Value [ACF]
- Front end form to create a custom post with preview
- importing third party json feed as custom post type [closed]
- update_post_meta and update_field ony working when saving the post
- Advanced Custom Fields – Get custom fields from parent page
- Add custom field to the archive page?
- How to get “Additional CSS Class” for ACF Gutenberg block
- how to get posts by custom post type then display Custom fields?
- Advanced Custom Fields and Yoast SEO keyword analysis [closed]
- Advanced Custom Fields select field : How to echo the label, not the value? [closed]
- How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action
- functions.php inject inline css
- Using OR conditions in meta_query for query_posts argument
- Matching Serialized Arrays with meta_query
- advanced custom fields update_field for field type: Taxonomy
- Get value in custom field with taxonomy [closed]
- ACF: get_field() returning false [closed]
- ACF Relationship Field Search Filtering [closed]
- How to List Events by Year and Month Using Advanced Custom Fields?
- Custom permalinks with NextGEN Gallery
- Infinite scroll / lazy loading with NextGen Gallery [closed]
- Is it possible to add custom fields to a WooCommerce attribute term? [closed]
- Filtering a WP_Query meta_query by numeric values isn’t working
- How to position a custom field before the editor
- Load entire NextGEN gallery from single thumbnail?
- Generate a excerpt from an ACF-wysiwyg-field
- Populate a ACF Select Dropdown from Custom Post Type
- Preferred way to include Advanced Custom Fields in a plugin?
- Automatically fill custom field value on post publish/update
- How to display product price of the product in loop
- get_field not displaying my custom field value
- Adding custom fields to the header.php
- Using Advanced Custom Fields with WordPress and Lightbox
- Display post_object content using Advanced Custom Fields plugin
- Want image captions to be from img ALT tags not title tags
- Remove old custom field after import
- Unable to get Preview of Uploaded image within a Custom Meta box
- How to get_terms() only of terms matching an ACF meta value?
- Advanced Custom Fields Multisite Upload/Imagery Issue [closed]
- Filter a custom field based on selection of another custom field (ACF) [closed]
- Pods cms and “advanced custom fields” plugin
- Compare two numeric custom fields
- Advanced Custom Fields – Query Efficiency
- Remove Category description textarea
- Inserting Gravity Form checkbox values into Advanced Custom Fields [closed]
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- How do I get the attributes of a short code from a post?
- Initialize JS with an ajax loaded ACF form
- ACF datepicker meta_query Compare Dates in m/d/Y g:i a – Not in Ymd Format
- Show/hide Widgets in Dashboard Based on Current Advanced Custom Fields Option
- If Custom Field is empty don’t display div
- Adding a body class with ACF
- Returning all radio button options when using Advanced Custom Fields
- ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
- How to store ACF custom fields data in a custom table
- Retrieve custom fields on Categories, using WP-API
- Capturing arbitrary semantic URL arguments
- Generate Advanced Custom Fields box in custom admin menu page
- Make permalinks based on an ACF-field