Comments (2)
You cannot rely on get_children
for the reason you state.
Load a FooGallery instance:
$gallery = FooGallery::get_by_id( $gallery_id );
And then you can loop through the attachments:
foreach ( $gallery->attachments() as $attachment ) {
You could then keep a count of the attachments you go through and break out after 3
from foogallery.
That's perfect, just what i needed, thank you. Great plugin, and great support.
from foogallery.
Related Issues (20)
- Add Woocommerce Quick Buy button to FooGallery HOT 2
- Captions and descriptions disappearing on hover. HOT 1
- Change caption background color and text size HOT 1
- Add Foogallery"button does not work
- Performance and behavior HOT 1
- http error while uploading image
- Masonry layout, unable to remove caption space
- FooGallery get wp_query to work HOT 1
- one of album has error and can't edit and show HOT 4
- Descriptions cut off on mobile devices HOT 1
- [Compatibility] Real Media Library HOT 3
- "wp is not defined" error when editing Foogallery Album
- [Attribute src lost on img element]
- Simple portfolio images are not shown when height is not set HOT 1
- Deprecated filter notice in AIOSEO v4.0.0 HOT 2
- FooGallery Albums Extension is breaking Homepage Canonical HOT 1
- Thumbnails not generated HOT 2
- Update to latest Freemius SDK
- GUID usage for URL? HOT 1
- We can see a public key into the codebase HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foogallery.