I’m using WP 6.4.2, with ACF 6.2.4?and ACF Photo Gallery Field 2.5.
With the second plugin, I’ve created a new field, that is a slider. We’ll call it “featured_image_slider”.
Currently, the function
acf_photo_gallery(‘featured_image_slider’, get_the_ID())
is returning an empty Array. And I don’t understand why. The Id and field name are both correct.
Do you have ideas?
]]>can you integrate these scénarios or give us a tip to apply them?
can we expect a modification of acf gallery with your plugin improved to be usable in frontend for all users?
/** ACF makes first gallery image featured image**/
add_filter('acf/save_post', 'gallery_to_thumbnail');
function gallery_to_thumbnail($post_id) {
$gallery = get_field('gallery', $post_id, false); //your gallery field name here
if (!empty($gallery)) {
$image_id = $gallery[0];
set_post_thumbnail($post_id, $image_id);
}
}
my snippet to put the first image of the gallery field in the featured image of the post does not work in front end with your plugin.
in backend it works normally.
can you adapt it or include this senario?
what your plugin can’t understand with my snippet
I’m got custom email args to display custom field data from posts submitted using ACFE forms and they’re all displaying fine. But I’m having issues getting images from an ACF gallery field from the post to be attached to the email as attachments. I noticed there’s a dynamic option in the attachments tab of Email actions but I believe it only works with single image fields. This is the code I have:
https://snippi.com/s/s4l8jkf
Thanks.
]]>Thanks for this great plugin. Great work!
I have Repeater and Gallery field types on the product page and would want to allow my vendors to add data to those fields.
Any news when can I expect these two fields to be supported by ACF For Dokan?
Thanks!
]]>I have problem with using ACF Gallery with Woocomerce Product Filtering. When I am searching product by its attribute everything is ok, ACF Gallery of colors under text is displayed:
Problem occurs when I try to search by text (Woocommerce Product Filtering), I wrote the name of the product:
Problem with displaying ACF Gallery
Colors under text are not displaying, I am getting:
Illegal string offset ‘url’ in woocommerce/content-product.php
My code there is:
$images = get_field('colors');
if( $images ) { ?>
<?php
for ($i = 0;$i < count($images) && $i < 38;$i++) { ?>
<img src="<?php echo $images[$i]['sizes']['thumbnail']; ?>" alt="<?php echo $images[$i]['alt']?>" />
<?php } ?>
<?php } ?>
]]>