And of course. . the tripple check worked. Thanks so much for reccomending this – I’d found another thread with the same issue, however this time a plugin called
Wp Cleanup Optimizer Lite Edition
For SOME reason included google maps? WTF.
Thanks!
I’ll triple check, but I’ve already double checked and even turned off all other plugins. I’m 99.9% certain this isn’t the case, because it was the case then I turned off the other google maps script.
This returns nothing at all? I am very greatful for your help, I realize my knowledge is pretty low on php, however it seems like I’ve tried many ways that I thought should work and don’t. Possibly I’ll find another more wise way to do this.
I am open to suggestions for sure – the reason I’m doing this is I’m using another plugin called justified image grid, possibly it is the issue.
I can’t seem to get this code to work. . I do believe I need some formal PHP education! I’ll see what I can do, I just get no output from above. Thanks.
– EDIT there were no images attatched to the first post I tried it on, my bad. IT worked great. Now how do I get those numbers into a shortcode for a gallery? ie
[gallery ids"<--image ids-->"]
What I need is this
[justified_image_grid ids=315,314,305,306,308,309,307,313,311,312 ]
How do I get it to put out a nice output like that, without the trailing “,”? Anyone? Thanks.
Ok now I got it to return the id’s. . using:
<?php $images = get_field('acf-gallery'); if( $images ): ?>
<?php foreach( $images as $image ): ?>
<?php echo $image['id']; ?>,
<?php endforeach; ?>
<?php endif; ?>
The above gets me this output:
<div class="textwidget">
315,
314,
305,
306,
308,
309,
307,
313,
311,
312,
</div>
SO just to explain – I can get this to return some of the other fields, such as caption, title, url etc. I just can’t get it to return the ID that would be used in a [gallery ids=(this is what I need to pull)]
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.